Code: Show/Hide #include <iostream> #include "windows.h" using namespace std; //#pragma warning (disable : 4430) int Fertigo() { WritePrivateProfileString("Stuff","1","You better wash the duck!","stuff.ini"); { cout << "Stuff has been successfully written as a list."; } return 0; } void Menue() { cout << "\nThis is a test program ued to write a list of stuff to do.\n"; cout << "1 You better wash the duck!"; } int read() { int WriteIt; Menue(); cout << "Choose your pick you punk! "; cin >> WriteIt; switch( WriteIt ) { case 1 : Fertigo(); } return 0; } |
Quote: |
--------------------Configuration: Test - Win32 Debug-------------------- Compiling... Test.cpp Linking... LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main Debug/Test.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. Test.exe - 2 error(s), 0 warning(s) |
Mr Ekted wrote: |
Once you get it working, don't forget...
If you do not prefix your INI file names with ".\\", then Windows will look for it or create it in the Windows folder. |
Donkano wrote: |
[..]
Ya, that is the shitty thing with windows cause their directory browsing through programming is the pits. Yay for Linux! |
Quan Chi2 wrote: |
lol blah-er, you mean its kind of sad that I have to copy and paste? lol Its not sad when its my own code from my own program.. or is it? ![]() |
Solo Ace wrote: |
Donkano, even in Linux some actions default to a directory if nothing else was explicitly provided.
Please, don't "yay" Linux without knowing what you're talking about. Spending 5 minutes in a Linux environment doesn't make you a guru or anything. ![]() |
Quan Chi2 wrote: |
lol, but, can we kinda stay on topic ![]() I just need to know what I did wrong in the code lol i'll look it up some more |
Code: Show/Hide #include <iostream> #include "windows.h" using namespace std; //#pragma warning (disable : 4430) int main() { WritePrivateProfileString("Stuff","1","You better wash the duck!",".\\stuff.ini"); { cout << "Stuff has been successfully written as a list."; } system("PAUSE"); } void Menue() { cout << "\nThis is a test program ued to write a list of stuff to do.\n"; cout << "1 You better wash the duck!"; } int read() { int WriteIt; Menue(); cout << "Choose your pick you punk! "; cin >> WriteIt; switch( WriteIt ) { case 1 : main(); } return 0; } |
blah-er wrote: |
a thing called IRC and EggDrop. |
Quan Chi2 wrote: |
Problem solved. ![]() |
Muskrat wrote: |
[..]
I think Solo is going to have a field day with this. |
Code: Show/Hide #include <iostream> #include "windows.h" using namespace std; int main() { WritePrivateProfileString("Stuff","1","You better wash the duck!",".\\stuff.ini"); WritePrivateProfileString("Stuff","2","Food!",".\\stuff.ini"); WritePrivateProfileString("Stuff","3","MMMMM Good!",".\\stuff.ini"); WritePrivateProfileString("Stuff","4","Stupid head!",".\\stuff.ini"); { cout << "Stuff has been successfully written as a list.\n"; } return 10; } |
Solo Ace wrote: |
I used IRC before you were born, blah-er, silly troll.
I'd actually prefer Python since it's the language I'm currently using, but thanks, I know some PERL already. If you're promoting Linux, then do it in the right way, don't start giving out wrong ideas about the differences between Windows and Linux when they're not true. He's the same guy who tried to tell us Linux runs on UNIX. When promoting something make sure you're promoting it the right way. Oh and blah-er, it's called "BSD", get it right. |