I need a conversion of this line from C++ to C
also...can someone tell me if "qsort" works with -gccCode:cin.getline(testStr[i],80, '\n');
-Thanx
I need a conversion of this line from C++ to C
also...can someone tell me if "qsort" works with -gccCode:cin.getline(testStr[i],80, '\n');
-Thanx
fgets(teststr, 80, stdin)
yes
hey thanx...can you help me with one more conversion...
i need to know how to printf an array...Code:cout << testStr[i][j];
i used:
gave me some kinda..<null> error...or some kinda funky errorCode:printf ( testStr[i][j]);
-thanx
I'm guessing at how your storing. A 2d array?
printf("%s", testStr[i]);
[edit]
char testStr[5][81];
for(i=0; i < 5; i++)
fgets(testStr[i], 81, stdin);
for(i=0; i < 5; i++)
printf("%s", testStr[i]);
Should work for 2D arrays.
[/edit]
Last edited by ronin; 04-04-2003 at 02:13 PM.
I haven't used a compiler in ages, so please be gentle as I try to reacclimate myself. :P
yea...2D array