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 


Whats wrong here?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
paupav
Master Cheater
Reputation: 13

Joined: 15 Apr 2011
Posts: 314
Location: P. Sherman 42, Wallaby Way, Sydney

PostPosted: Sat Oct 15, 2011 3:44 pm    Post subject: Whats wrong here? Reply with quote

Code:

#include <iostream>


int main ()
{
using namespace std;
    int a, b, c;
    cin >> a;
    cout << " You have entered " << a;
   
    if (a <= 100)
    {
    b=88;
    b=c;
    cout << "\n\n\n\nb= " << b << "\n\nand c= " << c;
}
    else
   
    if (a > 100)
    {
          b=76576574;
    b=c;

    cout << " b= " << b << "\n\nand c= " << c;
}
cout << "\n\n\n\n";
    system("pause");
    return 0;
   
}



it shows b and c always 2

[SOLVED]

solved...

instead of
Code:
 
b=678
c=b;


should write:
Code:

b=678
b=c;


Last edited by paupav on Sun Oct 16, 2011 4:40 am; edited 1 time in total
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Sat Oct 15, 2011 4:28 pm    Post subject: Reply with quote

Just a heads up, if you are going to post requesting help in the future do not just post code and expect us to figure out whats wrong. Explain what is not working as you expected it would, post errors if you have any etc. but don't just post code or your topics will be locked.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Sat Oct 15, 2011 5:40 pm    Post subject: Reply with quote

that's an interesting indentation style you're using
Back to top
View user's profile Send private message
paupav
Master Cheater
Reputation: 13

Joined: 15 Apr 2011
Posts: 314
Location: P. Sherman 42, Wallaby Way, Sydney

PostPosted: Sun Oct 16, 2011 4:37 am    Post subject: Reply with quote

Wiccaan wrote:
Just a heads up, if you are going to post requesting help in the future do not just post code and expect us to figure out whats wrong. Explain what is not working as you expected it would, post errors if you have any etc. but don't just post code or your topics will be locked.


sry i forgot
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    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