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 


Thanks, close please

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Cyrusmages
Grandmaster Cheater Supreme
Reputation: 0

Joined: 22 Feb 2009
Posts: 1358

PostPosted: Sat Mar 28, 2009 11:09 am    Post subject: Thanks, close please Reply with quote

Heya, don't feel like talking a lot, so I'll get right into it.

Code:
#include "stdafx.h"//coded by VolatileAce
#include <string>
#include <iostream>

using namespace std;
char toUpper(char c){
   return (c >= 64 && c < 91) ? char(c+32) : c;
}

bool stringEquals(string s1, string s2){
   if(s1.length() != s2.length())
      return false;
   for(int i = 0; i < s1.length(); i++)
      if(toUpper(s1.at(i)) != toUpper(s2.at(i)))
         return false;
   return true;
}
int main(){
   string s;
   do{
      cout << "Please type in a greeting: ";
      getline(cin, s);//Begin IDs
     if(stringEquals(s, "Yo"))//Begin
         cout << "WASSUPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP DAWG" << endl;
     if(stringEquals(s, "Credits"))
   }while(s != "exit");
   cout << "Bye!" << endl;
   return 0;


If you don't know what it does, then please don't reply, I don't feel like discussing what it is, my head is pounding.

Now, this isn't my exact code, I edited it a bit to show an example.

Quote:
WASSUPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP DAWG


Is a very long thing and DAWG would roll over onto the next line, but it looks ugly.


WASSUPPPPPPPPPPPPPPPPPPPPPPPPP D
AWG

is what it'd do.

How would I make it to where it would say "WASUPPPPPPPPPPPPP" in one line and then "DAWG" in another.

Quote:
WASUPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
DAWG

_________________


If you have a mic, add me and tell me that you're from CEF or I won't add you (probably)


Last edited by Cyrusmages on Sat Mar 28, 2009 11:20 am; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger
sloppy
Expert Cheater
Reputation: 0

Joined: 17 Aug 2008
Posts: 123

PostPosted: Sat Mar 28, 2009 11:18 am    Post subject: Reply with quote

Code:
cout << "WASSUPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP\nDAWG"
Back to top
View user's profile Send private message
Cyrusmages
Grandmaster Cheater Supreme
Reputation: 0

Joined: 22 Feb 2009
Posts: 1358

PostPosted: Sat Mar 28, 2009 11:20 am    Post subject: Reply with quote

That made me mad, because of how simple it was.

Thank you Smile

_________________


If you have a mic, add me and tell me that you're from CEF or I won't add you (probably)
Back to top
View user's profile Send private message MSN Messenger
VolatileAce
Cheater
Reputation: 0

Joined: 19 Mar 2009
Posts: 30
Location: 0001001100110111

PostPosted: Sat Mar 28, 2009 11:44 am    Post subject: Reply with quote

Either use the escape n \n character included in the string, or to be more clear to other programmers, you can also use << endl <<
Back to top
View user's profile Send private message
Cyrusmages
Grandmaster Cheater Supreme
Reputation: 0

Joined: 22 Feb 2009
Posts: 1358

PostPosted: Sat Mar 28, 2009 12:10 pm    Post subject: Reply with quote

VolatileAce wrote:
Either use the escape n \n character included in the string, or to be more clear to other programmers, you can also use << endl <<


It kept saying the PM wouldn't go through >_< Did you actually get it?

_________________


If you have a mic, add me and tell me that you're from CEF or I won't add you (probably)
Back to top
View user's profile Send private message MSN Messenger
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