reading a file into a program with a class
| cannsyl (43) | |||
| ok for whatever reason I can't get anything to work properly. All the tutors at my university have apparently left for summer already and I have two programs to resolve by friday. I am desperate. I need help please. here is my problem. I need c strings for 20 characters instead of c++ strings (my professor wants it that way) and i need to be able to read in a file instead of user input. I am not getting either to work. WHY??? Please help me. I was doing really well in this class, but I am just not understanding this...Here is what I have | |||
| DiptenduDas (84) | |||
| Hi..., What the below piece of code does????
Don't U think it will help U to keep track of ur problem if posted under a single heading instead of 2 different posts... | |||
| cannsyl (43) | |||
| Well I had a bit different code and question and I thought it better to ask in a different post. | |||
| cannsyl (43) | |||
| here is my code...I don't know why it doesn't work. could someone please help me I only have 1 day left in the semester. Thanks | |||
| enixi0s (33) | |||
| It may be easier rather than posting your entire code, just to post the important bit. I didnt quite understand your problem so i can only guess. Is this the sort of thing you are looking for? memblock = new char [21]; file.read (memblock, 21); http://www.cplusplus.com/doc/tutorial/files.html | |||
| cannsyl (43) | |||
Ok here is the problem. I can't get the file to read in it says it isn't open, any ideas why?
| |||
This topic is archived - New replies not allowed.
