Created
November 25, 2010 23:17
pr1 ispit snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void getline_1() { | |
char *temp = new char[10], *temp_2 = new char[100]; | |
cout << "unesite TACNO 10 znakova :"; | |
cin.getline(temp, 10); | |
cin.ignore(100); | |
cout << "ukucano je :" << temp << endl; | |
cout << "duzina stringa je " << strlen(temp) << endl; | |
cout << "unesite/2 TACNO 10 znakova :"; | |
cin.getline(temp_2, 10); | |
cout << "ukucano je :" << temp_2 << endl; | |
cout << "duzina stringa je " << strlen(temp_2) << endl; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment