+ 2
How can i read multiple line of string with spaice in c++
I try to use gets() in for() loop but it give an error when passing a array as an argument.
5 Answers
+ 2
i want to read multiple l
string in a array
+ 1
it read 10 number of charector string
not multiple line
0
char a[10];
gets(a);
this will work
0
you don't need a for loop
0
increase the array size. i just have this as an example. you can initialize it as char a[100] for 100 characters including space.