| View previous topic :: View next topic |
| Author |
Message |
Cyrusmages Grandmaster Cheater Supreme
Reputation: 0
Joined: 22 Feb 2009 Posts: 1358
|
Posted: Sat Mar 28, 2009 11:09 am Post subject: Thanks, close please |
|
|
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 |
|
 |
sloppy Expert Cheater
Reputation: 0
Joined: 17 Aug 2008 Posts: 123
|
Posted: Sat Mar 28, 2009 11:18 am Post subject: |
|
|
| Code: | | cout << "WASSUPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP\nDAWG" |
|
|
| Back to top |
|
 |
Cyrusmages Grandmaster Cheater Supreme
Reputation: 0
Joined: 22 Feb 2009 Posts: 1358
|
Posted: Sat Mar 28, 2009 11:20 am Post subject: |
|
|
That made me mad, because of how simple it was.
Thank you
_________________
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 |
|
 |
VolatileAce Cheater
Reputation: 0
Joined: 19 Mar 2009 Posts: 30 Location: 0001001100110111
|
Posted: Sat Mar 28, 2009 11:44 am Post subject: |
|
|
| 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 |
|
 |
Cyrusmages Grandmaster Cheater Supreme
Reputation: 0
Joined: 22 Feb 2009 Posts: 1358
|
Posted: Sat Mar 28, 2009 12:10 pm Post subject: |
|
|
| 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 |
|
 |
|