Click here to Skip to main content
15,924,193 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalundeclared identifier ,even when i declared it Pin
svsrikanth15-Dec-03 9:38
svsrikanth15-Dec-03 9:38 
GeneralRe: undeclared identifier ,even when i declared it Pin
Christian Graus15-Dec-03 10:02
protectorChristian Graus15-Dec-03 10:02 
GeneralRe: undeclared identifier ,even when i declared it Pin
svsrikanth17-Dec-03 5:06
svsrikanth17-Dec-03 5:06 
GeneralRe: undeclared identifier ,even when i declared it Pin
Christian Graus17-Dec-03 12:10
protectorChristian Graus17-Dec-03 12:10 
GeneralRe: undeclared identifier ,even when i declared it Pin
Anonymous15-Dec-03 17:14
Anonymous15-Dec-03 17:14 
GeneralRe: undeclared identifier ,even when i declared it Pin
svsrikanth17-Dec-03 5:08
svsrikanth17-Dec-03 5:08 
Generalproject Pin
sakota15-Dec-03 8:46
sakota15-Dec-03 8:46 
GeneralRe: project Pin
Christian Graus15-Dec-03 10:07
protectorChristian Graus15-Dec-03 10:07 
Hi there. If you need to read and write information from a file, you should read my articles on iostreams. Basically you #include<fstream> and then you can read and write files easily, and you could even set yourself up to read and write your custom structures with inserters and extractors ( this is not hard, I have an article on it here on CP ). Then you could do this:


pass myPass;
ifstream myFile("c:\\file.txt");

while (myFile.good())
{
myFile >> myPass;
// do something with the passenger
}

// the end.

It's a shame you need to use char *'s instead of strings. A struct is just a class whose default access is public, you should add constructors and destructors to the structs, the constructor should set the char *'s to null, and the destructors show call delete [] on them if they are not null.


Christian

I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
GeneralRe: project Pin
sakota15-Dec-03 10:57
sakota15-Dec-03 10:57 
GeneralRe: project Pin
Christian Graus15-Dec-03 11:17
protectorChristian Graus15-Dec-03 11:17 
GeneralRe: project Pin
sakota15-Dec-03 11:04
sakota15-Dec-03 11:04 
GeneralRe: project Pin
Christian Graus15-Dec-03 11:18
protectorChristian Graus15-Dec-03 11:18 
GeneralRe: project Pin
sakota16-Dec-03 12:32
sakota16-Dec-03 12:32 
GeneralRe: project Pin
Christian Graus16-Dec-03 12:48
protectorChristian Graus16-Dec-03 12:48 
GeneralRe: project Pin
Jörgen Sigvardsson15-Dec-03 10:12
Jörgen Sigvardsson15-Dec-03 10:12 
GeneralRe: project Pin
Christian Graus15-Dec-03 10:15
protectorChristian Graus15-Dec-03 10:15 
GeneralRe: project Pin
Bob Stanneveld15-Dec-03 21:31
Bob Stanneveld15-Dec-03 21:31 
GeneralUsing the string class within other classes Pin
dolus15-Dec-03 8:34
dolus15-Dec-03 8:34 
GeneralRe: Using the string class within other classes Pin
Christian Graus15-Dec-03 8:48
protectorChristian Graus15-Dec-03 8:48 
Generalhummm....... thread question Pin
Alan Kozlay15-Dec-03 8:03
Alan Kozlay15-Dec-03 8:03 
GeneralRe: hummm....... thread question Pin
Alexander M.,16-Dec-03 8:59
Alexander M.,16-Dec-03 8:59 
Generalincluding 2 user defined header files Pin
Mr. Cully15-Dec-03 7:59
Mr. Cully15-Dec-03 7:59 
GeneralRe: including 2 user defined header files Pin
Christian Graus15-Dec-03 8:50
protectorChristian Graus15-Dec-03 8:50 
GeneralRe: including 2 user defined header files Pin
John M. Drescher15-Dec-03 9:28
John M. Drescher15-Dec-03 9:28 
GeneralRe: including 2 user defined header files Pin
Anonymous15-Dec-03 17:34
Anonymous15-Dec-03 17:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.