Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › C++/C Programming › Messed up...

Messed up...

Posts 1–9 of 9 · Page 1 of 1
Zhhot
Zhhot
Messed up...
Code:
#include <iostream>
using namespace std;

int main()
{
    int length;
    length = 7;
    cout << "The length is";
    cout << length;
    system("pause");
    return 0;
}
and this is wat i get...

[IMG]http://i961.photobucke*****m/albums/ae94/sami123_photo/untitled-2.jpg[/IMG]

i want the (press any key to continue...) in the second line please help me.

ALSO MODS: CAN U PLEASE MAKE A HELP THREAD AND STICKY IT PLEASE
#1 · 17y ago
ZE
zeco
Quote Originally Posted by Zhhot View Post
Code:
#include <iostream>
using namespace std;

int main()
{
    int length;
    length = 7;
    cout << "The length is";
    cout << length;
    system("pause");
    return 0;
}
and this is wat i get...

[IMG]http://i961.photobucke*****m/albums/ae94/sami123_photo/untitled-2.jpg[/IMG]

i want the (press any key to continue...) in the second line please help me.

ALSO MODS: CAN U PLEASE MAKE A HELP THREAD AND STICKY IT PLEASE
Well, if you want only the "press any key to continue" to appear on the next line, you can use cout << endl;
For example:
Code:
#include <iostream>
using namespace std;

int main()
{
    int length;
    length = 7;
    cout << "The length is";
    cout << length;
    cout << endl;
    system("pause");
    return 0;
}
Or you could do it like this

Code:
#include <iostream>
using namespace std;

int main()
{
    int length;
    length = 7;
    cout << "The length is";
    cout << length << endl;
    system("pause");
    return 0;
}
However if you had a string there is another option, the newline character (\n), for example
Code:
#include <iostream>
using namespace std;

int main()
{
    int length;
    length = 7;
    cout << "Yay random sentence\n";
    cout << "Yay thanks to the newline character, i'm by myself\n";
    system("pause");
    return 0;
}
Everything from the newline character onwards, is put into a new line.
Another example:
Code:
cout << "there is a new\nline in the middle of newline!!";
Would appear in the console as
Code:
there is a new
line in the middle of newline!!
#2 · edited 17y ago · 17y ago
Zhhot
Zhhot
oh thanks man, that explains so much
#3 · 17y ago
ZE
zeco
Quote Originally Posted by Zhhot View Post
oh thanks man, that explains so much
No problem, glad to help =).
#4 · 17y ago
Zhhot
Zhhot
hey zeco, i was looking at ur goal list, and noticed something wierd. y didnt u tick mark "Have a good grasp of C++", i think ur pretty good
#5 · 17y ago
ZE
zeco
Quote Originally Posted by Zhhot View Post
hey zeco, i was looking at ur goal list, and noticed something wierd. y didnt u tick mark "Have a good grasp of C++", i think ur pretty good
Haha, well because i still have a lot to learn. I'm probably going to tick it when i finish this C++ book (C++ primer plus). I just happen to know more than the book has taught so far cause when i feel like doing stuff, i just research how regardless of whether or not i'll eventually learn it in the book. I'm a bit impatient that way, and i love to learn =)
#6 · 17y ago
royalinus
royalinus
You also could do this

Code:
#include <iostream>
using namespace std;

#define NEWLINE '\n'

int main()
{
    int length;
    length = 7;
    cout << "The length is";
    cout << length;
    cout << NEWLINE;
    system("pause");
    return 0;
}
You can change the NEWLINE to whatever you want, I wouldn't actually recommended this by the way. endl is easier in my opinion
#7 · 17y ago
Zhhot
Zhhot
ty royal, im starting to love mpgh, every1 is so helpfull =)
#8 · 17y ago
royalinus
royalinus
Quote Originally Posted by Zhhot View Post
ty royal, im starting to love mpgh, every1 is so helpfull =)
Your welcome, theres so many ways to do one thing
and I love it here too. And that NEWLINE thing I just learned lol
#9 · 17y ago
Posts 1–9 of 9 · Page 1 of 1

Post a Reply

Similar Threads

  • Gunz Messed Up?By Fedaykin in Gunz General
    8Last post 20y ago
  • messing aroundBy BLooDy in Art & Graphic Design
    12Last post 19y ago
  • Warrock messed up! Read this!By M-Tune in WarRock - International Hacks
    8Last post 19y ago
  • [Help me] My Warrock is messed up...By H4rdc0r3NL in WarRock - International Hacks
    11Last post 19y ago
  • Times messed up?By Tiresome in General
    12Last post 19y ago

Tags for this Thread

#help needed#messed