Learning C Programming Lesson 32: Pointers Array and Structure
Top Comments
All Comments (16)
-
@nickrohn93 Never looked too deeply into C++ to be honest. Ran away from C as fast as I could and embraced Java. It's a sad realization that some day I will need to go back to C/C++ on my hands and knees and beg for its forgiveness.
-
@TheCosmicFrog Well if you look at c++'s standard lib they use char type :P
-
How can't you people see? Do you know how to enlarge the window?
-
There are lots of errors in these videos, on the pointer part as well as the structure part!!
I don't think this guy is a qualified teacher or experienced programmer
-
What will be the type of ptr_b?
int *ptr, ptr_b;
-
@pagola hahah, what he did was fine. An array is a pointer. It points to a mem loc which can then hold data, which in this case is a 4 ASCII characters.
-
@djcrank7 try the predefined gets() function, you making a simple task more complicated than it needs to be.
-
ok...i have a question...if i would like to read the names of a family(for example for 4 people)..i set the structure and then in main i write...struct family array[4];...but how should i read the exact names...like this??
for(i=0;i<=3;i++){ gets(array.name[i]);/*or with scanf...??*/
}...plz answer...
can't see
OTownDown54 3 years ago 10
@TheCosmicFrog yeah C++ has its own string library. It's still a C-style string though; but, you don't have to waste time writing the same general functions over and over again.
Stung5 1 year ago