Jump to content
Heads Up! This website is no longer maintained, if your a member from our era, consider joining the discord to say hello.
Sign in to follow this  

Making a program

Recommended Posts

I have some questions and i am hoping for answers. i made a script for c++ and i made it a .bat and also a .exe and none of them even started up after clicking them. if anyone knows anything im doing wrong or some training i need or if i made an error maybe?

Share this post


Link to post

Would probably be helpful if you showed the code...

Share this post


Link to post

yea seriously, i mean i can help u, with my little programming skills, but we need to know the code dude

Share this post


Link to post

yea seriously, i mean i can help u, with my little programming skills, but we need to know the code dude

well its not really a script look ill show you it but is like nothing its just saying hello but it never shows up.

 

 

//first c++ program

#include iostream.h

main()

 

{

cout<<"hello";

 

 

return();

 

}

Share this post


Link to post

STUPID LEECHER!!!!!!!

Share this post


Link to post

lmfao, you didn't put in a pause code, it tells the program to pause before closing... the thing will just start up and close right after, I don't have my C++ book laying around by me, but I know that you need a pause line to stop the program from closing before you can do anything.

Share this post


Link to post

lmfao, you didn't put in a pause code, it tells the program to pause before closing... the thing will just start up and close right after, I don't have my C++ book laying around by me, but I know that you need a pause line to stop the program from closing before you can do anything.

Im making a program too. How do you make a pause code?

Share this post


Link to post

Yes how do i make a pause function? what is a pause function also and how does it work. But most importantly i want to know the script for the pause code function please.

Share this post


Link to post

void pause()
{
std::cin.clear();
std::cin.ignore(std::numeric_limits<std::streamsize>::max()); //
Clear whatever's still in the buffer
std::cout << "Press Enter to continue . . .\n";
std::cin.ignore(std::numeric_limits<std::streamsize>::max(),
'\n');
}

 

Will that do?

Share this post


Link to post

yes! There you go! That will stop it so that you will be able to see what it says and actually input a command before it closes... :D

Share this post


Link to post

Glad I could help!

Share this post


Link to post

If you are programing an C++, use these for fast and clear coding.

 

 

#include <iostream>

int main()
{
std::cout << "Hello\n";
return 0;
}

 

 

And please download an compiler, that will make it eseyer.

Share this post


Link to post

krazy, if you want to make a pause code, then pause your life, and rewind. Wonder if you can do anything better...

Share this post


Link to post
krazy, if you want to make a pause code, then pause your life, and rewind. Wonder if you can do anything better...

 

Keep flames in the flame board.

 

Upload your exe too! I want to see your awesome hello program! ;)

 

Good job ghozt.

Edit: This is a lot easier in VB to do lulz.

Share this post


Link to post

This topic was last active before you posted two years ago. If anyone would like me to reopen please send me a message thank you.

 

-=[Closed]=-

Share this post


Link to post
Guest
This topic is now closed to further replies.
Sign in to follow this  

×