Commented 16 years ago2008-05-03 13:37:24 UTCComment #58612
Try Visual Basic .NET 2005. I can help you to get started. I've been .NETting for about two years. VB.NET is much easier to master and learn, but keep in mind that you can't use it for HL SDK programming.
Commented 16 years ago2008-05-03 13:52:05 UTCComment #58633
It's for an university project, to compile it on Linux console. I have windows vista on my pc. I just want to create a main program and some classes and then link all the .o to have the .exe (yeah I'm a programming noob)
EDIT: well... I want to compile it on windows, not just linux
Commented 16 years ago2008-05-03 15:13:30 UTCComment #58637
And... what's the problem? Install CygWIN and the gcc-g++ package, then open the cygwin console and write this: g++ -o /test.exe /spikes_project_main.cpp Just like you would do if you were running linux/os x.
Commented 16 years ago2008-05-03 17:56:34 UTCComment #58638
Why are you calling main() at the end of main()? If you hold down enter that you will eventually run out of RAM. And I think you forgot some break; statements...
Commented 16 years ago2008-05-03 19:26:27 UTCComment #58621
-potatis i'm calling main that after it ends to start again. I havnt forgot anything. There is no point of using break; after last case.For the ram thing its easy to use Sleep(100). but its just like saing typeing /me dosent work:O. -spike Switch can aslo be made with If. If you like programming/or want to learn C++ its a good choice, its portable and you dont need frameworks like vb.net. If you dont know the basics cygwin is useless.
Commented 16 years ago2008-05-03 20:03:01 UTCComment #58639
"There is no point of using break; after last case" No, but after "You shure?".
"For the ram thing its easy to use Sleep(100)" thats not what I meant. If a function calls itself, without terminating itself, some memory are still left, and it will be, always, if the instance of the function is not terminated. And every time you call the function more and more memory will be used. It's like saying "every time you think of a throw a ball, throw another one". Eventually there will be to many balls. It doesn't really matter if you hold down enter, or just use the program as you are supposed to be using it. Use a while statement instead.
Commented 16 years ago2008-05-04 04:47:32 UTCComment #58622
potatis when the first case is true the break will stop analyzing the next cases, so since there is nothing alce to analyze after last case there is no point of adding another break; I know its not an elegant code it could be writed in many other ways but you wont run out of ram, this shit its like a big loop but its stoped by switch so it wont eat ur ram neither cpu.
SILENCE
GOODBYE SPIDERMAAAAAN
OH LOOK! IT'S SPIDERMAN! SHOOT HIM!
LOOKS LIKE YOU ARE A BOORN LOOOOOSSSEEER
This r mai base
I can help you to get started. I've been .NETting for about two years.
VB.NET is much easier to master and learn, but keep in mind that you can't use it for HL SDK programming.
Your choice.
EDIT: well... I want to compile it on windows, not just linux
Install CygWIN and the gcc-g++ package, then open the cygwin console and write this:
g++ -o /test.exe /spikes_project_main.cpp
Just like you would do if you were running linux/os x.
using namespace std;
int main(){
char yesno;
system("color b");
cout << "Hello? i'm Spike te programator" << endl;
cout << "Do i suck or not?: y/n" << endl;
cin >> yesno;
switch(yesno)
{
case 'y' : break;
case 'n' : default: }
system("pause");
system("CLS");
return main();
}
If you hold down enter that you will eventually run out of RAM.
And I think you forgot some break; statements...
-spike Switch can aslo be made with If. If you like programming/or want to learn C++ its a good choice, its portable and you dont need frameworks like vb.net. If you dont know the basics cygwin is useless.
"For the ram thing its easy to use Sleep(100)" thats not what I meant. If a function calls itself, without terminating itself, some memory are still left, and it will be, always, if the instance of the function is not terminated. And every time you call the function more and more memory will be used. It's like saying "every time you think of a throw a ball, throw another one". Eventually there will be to many balls.
It doesn't really matter if you hold down enter, or just use the program as you are supposed to be using it. Use a while statement instead.
You shure?
Are you retard? you can only use N/Y!!!
So where do you program? On wordpad?