Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


C++ help

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
ups2000ups
I post too much
Reputation: 0

Joined: 31 Jul 2006
Posts: 2471

PostPosted: Wed Oct 10, 2007 1:30 am    Post subject: C++ help Reply with quote

well im a newby with c++ and i trying to learn
the program quit when you press any key when the "l4" shows
how to i make it repeat from stage 1 and save l4 value?

Code:

#include <iostream>
#include <conio.h>                                          
void main()

{
int l1,l3,l4,l5,l6,l7,l8,l9;

char lol;
std::cout<<"Welcome To My Calculator ..... it sux but anyway\nTal:";
//första talet
std::cin>> l1;

//vad man ska göra med det
std::cout<<"Vad:";
std::cin>> lol;

//vilket tal man ska göra det med
std::cout<<"Med:";
std::cin>> l3;
//visa talet
//---------------------------------------- +
if (lol == '+')
{
l4 = l1+l3;
}
//---------------------------------------- -
if (lol == '-')
{
l4 = l1-l3;
}
//---------------------------------------- *
if (lol == '*')
{
l4 = l1*l3;
}
//---------------------------------------- /
if (lol == '/')
{
l4 = l1/l3;
}



std::cout<<"Summa:"<<l4;

   ::_getch();
}

_________________
dont complain about my english...
1*1 = 2?
Back to top
View user's profile Send private message
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Wed Oct 10, 2007 7:27 am    Post subject: Reply with quote

lol I started with C++ yesterday Very Happy and had the same problem
If you dont want that it quits:

If I use cin.get() on some places it is working. If you dont want to use this

start => run => cmd =>
Code:
cd path/to/your/file

[ENTER]
Code:
loloololol.exe

[ENTER]
and it wont close.
Back to top
View user's profile Send private message
benlue
Moderator
Reputation: 0

Joined: 09 Oct 2006
Posts: 2142

PostPosted: Wed Oct 10, 2007 8:08 am    Post subject: Reply with quote

Locked for the mass posting.
Don't try that again!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites