ZFGC
Projects => Discussion => Topic started by: joeshmo on April 12, 2006, 03:07:15 am
-
Put into your compiler and compile. Its fun.
#include<iostream>
#include<string>
using namespace std;
int main() {
int $n;
cout<<"Enter the starting number! \n";
cin>>$n;
if($n<85000) {
$n=85000;
cout<<"Your number was too low, we changed it to 85000. n_n \n";
}
while($n>0) {
cout<<$n <<'\n';
$n--;
}
cout<<"Fire! \n";
system("Pause");
}
Made by me!
-
heh nice.but FYI dont use system("pause") because it adds on to your file size and it kinda gives more mem usage. Practice keyhit methods =P but nice job
-
hmm, cin.get() didnt work here though. Got any alternatives?
-
i havent programmed c++ in almost a year so i forget =P look up on cprogramming.com i think the link is or google "c++ key hit methods" you should get something to help you there
P.S NICE START DUDE!
-
Thanks alot gm! Any other great programs? Post em here.
-
lol this is all i remember
#include <iostream.h>
int main()
{
cout <<"Rello world!\n"endl;
return 0;
}
lol
-
lol this is all i remember
#include <iostream.h>
int main()
{
cout <<"Rello world!\n"endl;
return 0;
}
lol
Actually that code is invalid. They changed #include<iostream.h> to #include<iostream> and you now either have to put std::(sexual transmited disease) before most functions or say: using namespace std;. See why C++ is kidna confusing?
-
cuz it hates everything =D
-
its true. C++ does hate everything. Same with most programing languages.
-
lol this is all i remember
#include <iostream.h>
int main()
{
cout <<"Rello world!\n"endl;
return 0;
}
lol
Actually that code is invalid. They changed #include<iostream.h> to #include<iostream> and you now either have to put std::(sexual transmited disease) before most functions or say: using namespace std;. See why C++ is kidna confusing?
C++ itself is pretty straightforward, it's just a matter of keeping your libraries in mind.
-
Actually that code is invalid. They changed #include<iostream.h> to #include<iostream> and you now either have to put std::(sexual transmited disease) before most functions or say: using namespace std;. See why C++ is kidna confusing?
DIfferent compilers use different things. VC++6 uses string.h, and errors if you enter it without the extension. Welcome to the real world :/
-
lol this is all i remember
#include <iostream.h>
int main()
{
cout <<"Rello world!\n"endl;
return 0;
}
lol
You've broken it, XD.
Just put another << before the "Rello World!" and the enl, because they're two completely different things.
Though why you'd want an \n and an endl is beyond me.
-
Actually that code is invalid. They changed #include<iostream.h> to #include<iostream> and you now either have to put std::(sexual transmited disease) before most functions or say: using namespace std;. See why C++ is kidna confusing?
DIfferent compilers use different things. VC++6 uses string.h, and errors if you enter it without the extension. Welcome to the real world :/
When i used vc++6 (..well..im still using uit just now but i may switch after my current project) i downloaded updated headers that were compatibe enough with vc++6 while still being more-up to date I needed them to do certain win32 things).
Erm..Ever noticed how sometimes it actually lets to do partial specification on a function template, and not on a class template?..(and other times..its the other way around).
One time i even got an error in a macro, but it was in white space: I retyped it exactly and it compiled fine.
C++ prog > U{} of C++ progs
#include<iostream>
int main()
//Actual ascii from Wikipedia
{
using std::cout ;
using std::endl ;
cout
<<char(9)<<" ___" <<endl
<<char(9)<<"{o,o}" <<endl
<<char(9)<<"|)__)" <<endl
<<char(9)<<'-'<<'"'<<'-'<<'"'<<'-'<<endl
<<char(9)<<"O RLY?" <<endl
<<endl
<<"Press Return to continue..."
<<endl;
std::cin.get();
return 0;
}
-
XD, that was Pretty Funny Joe :P