-
Debug Mode
When you are using ifstream, you are refering to a file like this "file1.txt" as in the code.
This meens that you refer to a file that is within:
C:\Documents and Settings\Coding\My Documents\Visual Studio 2008\Projects\Test
This is a file that is in the debugfolder.
How does this work. Later when a application is finished you perheps want this file under C:\FinishedProgram\files.
What I meen is that within the application you are doing you have different folders with different files that you want to access through different folders like ex "c:\finishedprogram\files" or "c:\finishedprogram\files2"
How does this work because in debugmode you are just within the folder "Debug" under projects.
Code:
ifstream File("file1.txt");
-
Just make sure that file exists in the installation phase if your program does not create it.
-
ifstream is native and not managed. Don't use it.
-
It is difficult to know in the beginning all syntax wich are native and managed but am learning.
I do understand that you shouldn´t use native code within Form application.
Important to understand though, will it work anyway If you use native code or is it more because that it is not ment to be used in Forms.
Thanks
-
It doesn't work right because you use it within managed environment.
Use some sort of documents - it's not very hard at all to know what's managed and native.
Everything in the std:: namespace is native. Everything typical C is native.
Everything in the System and cli namespaces are managed.
-
I will keep this in mind. That is good to know.