1,608 Posted Topics
Re: It's up to your professor what s/he will accept. You'll be a better judge than any of us. Looking at your code quickly my biggest concern is I'm not sure how you are keeping track of the original indexes of each last name within your program sp you can match … | |
Re: Use code tags to post relevant code with error messages. The error messages should be in order of presentation by the compiler, as frequently if you fix the first error message the others go away as well. | |
Re: >namespaces are just logical units holding whatever belongs in a logical way together. That's about as good a description of namespaces as I've seen. However, cstdio.h isn't in namespace std either. cstdio is in namespace std (notice no .h) whereas stdio.h isn't in namespace std but has (just about) the … | |
Re: Doing this without using struct/classes will be tedious. You could have an array of firstnames only, an array of last names only, an array of middle names only, an array for each persons first exam grades, an array for each persons second exam grades, ..., an array for each persons … | |
Re: In the OP sentence was declared thus: string sentence[size]; Therefore, in the syntax used by the OP sentence is an array of string of size size. Therefore to refer to a given char of a given string you would need to use multidimensional []s. However, why use that syntax? It's … | |
Re: >is that means when i declare a instance of the class i need also declare a instance of the struct? No. You can have one (or more) lists and each list can have zero to N links/nodes/whatever. You have declared a list object in main(), which is fine, without declaring … | |
Re: You can check for palindrome(ness) using many different techniques. You could reverse the entire string and compare the original string with the reverse to see if it is the same, but that requires knowledge of how to compare strings (winbatch has indicated some of the ways to do that). An … | |
Re: [code] while(!Data.eof()) { cout<<ch; Data.get(ch); } Data.close(); [/code] I don't have access to a compiler at this time, but I suspect that the problem has to do with the above snippet. When you find EOF so eof() returns true and ! eof() becomes false, something else happens. In particular I … |
The End.