I wanna know how to avoid the program to scan only the first letter of a string...
Hi
try
#include<iostre am.h>
void main()
{
char str[10];
cout<<"\n Enter name";
cin.getline(str ,10);
cout<<str;
}
It will alow you to enter 9 char because last char in array has to be \0. User can enter more letters on the screen but only...
User Profile
Collapse
-
-
Dynamic 2 dimensional array problem with pointers
Hi there
I have a class within which i assign 2 dimension dynamic array of pointers which points to variable inside these class (variable is of type other class).
Now to get into that variable I have to use ptr-> but my ptrtoobj[i][j] is pointer to pointer and left hand side of -> has to be pointer to class/structure
when I use ptrtoobj[i][j]->class_variab le I'm getting an error of
type 'cell' does...
No activity results to display
Show More
Leave a comment: