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 


what is wrong here?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Random spam
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: Thu Aug 09, 2012 6:17 am    Post subject: what is wrong here? Reply with quote

it calculate wrong,
Code:

#include "stdafx.h"
#include <iostream>
#include <string>
#include <sstream>
using namespace std;
int main ()
{
system("color 05");
int godinaRodjenja, mjesecRodjenja, danRodjenja;
int danasnjiDan, danasnjiMjesec, danasnjaGodina;
int razlikaDana, razlikaMjeseci, razlikaGodina;
string myString;
string drzava;
string danasnjiDatum;
cout << "Are you from west or from east? \n(answer with east or west or write help for help) ";
getline(cin, drzava);

if(drzava == "help")
{
   cout << "\nIf you write west date will be formatted YYYY/MM/DD\nand if you write east date will be formatted DD/MM/YYYY";
   cout << "\n\nAre you from west or from east? (answer only with west or east) ";
getline(cin, drzava);
}
else if(drzava == "east")
   {
//danasnji dan
cout << "Enter witch day is today! " ;
getline(cin, danasnjiDatum);
stringstream(danasnjiDatum) >>danasnjiDan;
//danasnji mjesec
cout << "Enter witch month is today! " ;
getline(cin, danasnjiDatum);
stringstream(danasnjiDatum) >> danasnjiMjesec;
//danasnja godina
cout << "Enter witch year is today! " ;
getline(cin, danasnjiDatum);
stringstream(danasnjiDatum) >> danasnjaGodina;

//danasnji datum
cout << "So today is: " << danasnjiDan <<"." << danasnjiMjesec << "." << danasnjaGodina;

cout << "\nEnter day of birth! (only number) ";
getline(cin, myString);
stringstream(myString) >> danRodjenja;
cout << "\nEnter month of birth! (only number)";
getline(cin, myString);
stringstream(myString) >> mjesecRodjenja;
cout << "\nEnter year of birth! (only number)";
getline(cin, myString);
stringstream(myString) >> godinaRodjenja;
//cout << "\nYou have been born " << dan;  //provjera
   }

else if(drzava == "west")
          {
//danasnja godina
cout << "Enter witch year is today! " ;
getline(cin, danasnjiDatum);
stringstream(danasnjiDatum) >> danasnjaGodina;

//danasnji mjesec
cout << "Enter witch month is today! " ;
getline(cin, danasnjiDatum);
stringstream(danasnjiDatum) >> danasnjiMjesec;

//danasnji dan
cout << "Enter witch day is today! " ;
getline(cin, danasnjiDatum);
stringstream(danasnjiDatum) >> danasnjiDan;

//danasnji datum
cout << "So today is: " << danasnjiMjesec <<"." << danasnjiDan << "." << danasnjaGodina;

//unesti godinu rodjenja
cout << "\nEnter year of birth! (only number)";
getline(cin, myString);
stringstream(myString) >> godinaRodjenja;
//unesti mjesec rodjenja
cout << "\nEnter month of birth! (only number)";
getline(cin, myString);
stringstream(myString) >> mjesecRodjenja;
//unesti dan rodjenja
cout << "Enter day of birth! (only number) ";
getline(cin, myString);
stringstream(myString) >> danRodjenja;

            }
else
{
   cout << "\nWront input!\nPlease restart application!";
}
//cout << "\nYou have been born " << danRodjenja <<"." << mjesecRodjenja << "." <<godinaRodjenja;  //verification if everything is fine

// ------------------------ checked

//razlika dani

if (danRodjenja << danasnjiDan)
{
danasnjiDan + 30;
danasnjiMjesec--;
razlikaDana=danasnjiDan-danRodjenja;
}
else if (danRodjenja >= danasnjiDan)
{
 razlikaDana=danasnjiDan-danRodjenja;
}
else
{
cout << "\nNo imput, please restart application";
}

//razlika mjeseci

if (mjesecRodjenja << danasnjiMjesec)  // 9 << 8
{
danasnjaGodina--;
danasnjiMjesec + 12;
razlikaMjeseci=mjesecRodjenja-danasnjiMjesec;
}
else if (mjesecRodjenja >= danasnjiMjesec)
{
razlikaMjeseci=danasnjiMjesec-mjesecRodjenja;
}
else
{
cout << "\n No imput, please restart application";
}

//razlika godine
razlikaGodina=danasnjaGodina-godinaRodjenja;

cout <<"You live: " << razlikaDana <<" days, " << razlikaMjeseci <<" months, " << razlikaGodina << " years.";




cout << "\n";
system("pause");
return 0;
}
Back to top
View user's profile Send private message
Fafaffy
Cheater
Reputation: 65

Joined: 12 Dec 2007
Posts: 28

PostPosted: Thu Aug 09, 2012 11:36 am    Post subject: Reply with quote

I'm gonna say what I say to most retards:

How does it fuck up?
What portion of the code do you think is fucked up?
Screenshot of said error?

_________________
Brillia wrote:
I FUCKING FUCK SEX
Back to top
View user's profile Send private message Send e-mail
Up2Admin
I'm a spammer
Reputation: 126

Joined: 17 Oct 2007
Posts: 6549
Location: Texas

PostPosted: Thu Aug 09, 2012 11:38 am    Post subject: Reply with quote

I suggest using an editor that can help with these things.
_________________
Back to top
View user's profile Send private message Visit poster's website
Maes
Advanced Cheater
Reputation: 10

Joined: 09 Apr 2009
Posts: 50

PostPosted: Thu Aug 09, 2012 11:39 am    Post subject: Reply with quote

Up2Admin wrote:
I suggest using an editor that can help with these things.

Back to top
View user's profile Send private message
shitposter
Newbie cheater
Reputation: 5

Joined: 12 Nov 2008
Posts: 15

PostPosted: Thu Aug 09, 2012 11:55 am    Post subject: Reply with quote

This code is unreadable.
Back to top
View user's profile Send private message
Up2Admin
I'm a spammer
Reputation: 126

Joined: 17 Oct 2007
Posts: 6549
Location: Texas

PostPosted: Thu Aug 09, 2012 12:36 pm    Post subject: Reply with quote

xTremist wrote:
This code is unreadable.
Because the variables are in some stupid ass-backwards language, like Croatian or whatever.
_________________
Back to top
View user's profile Send private message Visit poster's website
elpacco
Grandmaster Cheater Supreme
Reputation: 30

Joined: 16 Oct 2007
Posts: 1258

PostPosted: Thu Aug 09, 2012 1:10 pm    Post subject: Reply with quote

which*
_________________
[AM]Misery wrote:

FangBanger wrote:
What is the best way for a lv19 Soldier to solo Sledge on Borderlands?
Shoot him.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
paupav
Master Cheater
Reputation: 13

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

PostPosted: Thu Aug 09, 2012 3:07 pm    Post subject: Reply with quote

nvm i found it todayDay + 30 , it should be todayDay+=30
Back to top
View user's profile Send private message
Sephiron
Master Cheater
Reputation: 34

Joined: 23 Aug 2008
Posts: 292
Location: JAPAN circa 1653, fucking some seagulls

PostPosted: Thu Aug 09, 2012 3:10 pm    Post subject: Reply with quote

The thing I hate about console c++ is that there's literally no practical application for it unless you know how to handle graphics; something I fucking don't know how to do.

I once made a pokemon style battle rpg with random monsters and items and an inventory system and everything, but it was all text based. I might actually try it again. Was pretty fun to make.

_________________
Nirojan wrote:
picked up 1,.5 g and them budduty picled up quarter o today we blase all of

Back to top
View user's profile Send private message MSN Messenger
paupav
Master Cheater
Reputation: 13

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

PostPosted: Thu Aug 09, 2012 3:12 pm    Post subject: Reply with quote

Sephiron wrote:
The thing I hate about console c++ is that there's literally no practical application for it unless you know how to handle graphics; something I fucking don't know how to do.

I once made a pokemon style battle rpg with random monsters and items and an inventory system and everything, but it was all text based. I might actually try it again. Was pretty fun to make.


what you mean? this all what im learning isnt going to be useful in making games?
Back to top
View user's profile Send private message
Sephiron
Master Cheater
Reputation: 34

Joined: 23 Aug 2008
Posts: 292
Location: JAPAN circa 1653, fucking some seagulls

PostPosted: Thu Aug 09, 2012 3:15 pm    Post subject: Reply with quote

paupav wrote:
Sephiron wrote:
The thing I hate about console c++ is that there's literally no practical application for it unless you know how to handle graphics; something I fucking don't know how to do.

I once made a pokemon style battle rpg with random monsters and items and an inventory system and everything, but it was all text based. I might actually try it again. Was pretty fun to make.


what you mean? this all what im learning isnt going to be useful in making games?


It's useful for teaching you how to make a game loop. What you did pretty much is make a fancy calculator. Keep learning. Find out how to call functions for different actions, and learn how to update things. Idunno. Like I said, I never got to graphics handling since something about it confuses me. I'm probably not the best example for these things.

_________________
Nirojan wrote:
picked up 1,.5 g and them budduty picled up quarter o today we blase all of

Back to top
View user's profile Send private message MSN Messenger
Evil_Intentions
Expert Cheater
Reputation: 65

Joined: 07 Jan 2010
Posts: 214

PostPosted: Thu Aug 09, 2012 3:35 pm    Post subject: Reply with quote

Sephiron wrote:
The thing I hate about console c++ is that there's literally no practical application for it unless you know how to handle graphics; something I fucking don't know how to do.

I once made a pokemon style battle rpg with random monsters and items and an inventory system and everything, but it was all text based. I might actually try it again. Was pretty fun to make.


I had liked using c++ to do some project euler problems back when I first started.
Back to top
View user's profile Send private message
Sephiron
Master Cheater
Reputation: 34

Joined: 23 Aug 2008
Posts: 292
Location: JAPAN circa 1653, fucking some seagulls

PostPosted: Thu Aug 09, 2012 3:41 pm    Post subject: Reply with quote

Evil_Intentions wrote:
Sephiron wrote:
The thing I hate about console c++ is that there's literally no practical application for it unless you know how to handle graphics; something I fucking don't know how to do.

I once made a pokemon style battle rpg with random monsters and items and an inventory system and everything, but it was all text based. I might actually try it again. Was pretty fun to make.


I had liked using c++ to do some project euler problems back when I first started.

That's always fun.

By the way OP, I tested your program and the math's a bit off.
for one, I tried it on my mom. She was born in September, yet it said she was 46 years and 2 months old (Implying that her birthday was 2 months ago). The year was correct, however.

_________________
Nirojan wrote:
picked up 1,.5 g and them budduty picled up quarter o today we blase all of

Back to top
View user's profile Send private message MSN Messenger
paupav
Master Cheater
Reputation: 13

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

PostPosted: Thu Aug 09, 2012 5:05 pm    Post subject: Reply with quote

Sephiron wrote:
Evil_Intentions wrote:
Sephiron wrote:
The thing I hate about console c++ is that there's literally no practical application for it unless you know how to handle graphics; something I fucking don't know how to do.

I once made a pokemon style battle rpg with random monsters and items and an inventory system and everything, but it was all text based. I might actually try it again. Was pretty fun to make.


I had liked using c++ to do some project euler problems back when I first started.

That's always fun.

By the way OP, I tested your program and the math's a bit off.
for one, I tried it on my mom. She was born in September, yet it said she was 46 years and 2 months old (Implying that her birthday was 2 months ago). The year was correct, however.

idk il see tomorrow, it work for me Very Happy ... but this was only practice anyway Very Happy ....
EDIT: i thought this is some other thread. i solved that problem
http://www.mediafire.com/?ntci4ry47ewndfr
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Random spam 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