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 › MultiPlayer Game Hacks & Cheats › CrossFire Hacks & Cheats › CrossFire Hack Coding / Programming / Source Code › Learn how to code C++ || Day 2 - Basic Output

Learn how to code C++ || Day 2 - Basic Output

Posts 1–6 of 6 · Page 1 of 1
P0
P0SEID0N
Learn how to code C++ || Day 2 - Basic Output
Lesson #2 - Basic Output

Today we are going to be looking at the acts of output.

Quote Originally Posted by Juan Soulie View Post
C++ uses a convenient abstraction called streams to perform input and output operations in sequential media such as the screen or the keyboard. A stream is an object where a program can either insert or extract characters to/from it.
If this doesn't seem clear to you at the moment, don't worry. You can always come back and re-read it once you have done some practical.

The first thing your going to do is output "Sup Bitches" onto your screen.
So start a new project (ctrl + shift + n) and type in (DO NOT copy and paste as you will learn it better if you type it):

Code:
#include <iostream>
using namespace std;
int main()
{
 cout << "Sup bitches";
 return 0;
}
Now press F9 to compile and run it. A window will come up asking you to save it. You must change the file extension from .c to .cpp then save it and continue. The result will look like this.

[html]Sup bitches[/html]

Now lets dissect that code.
#include <iostream>: Standard header needed for outputting and inputting streams
using namespace std: Explained as simply as possible, namespaces allows us to group a set of global classes, objects and/or functions under a name.Namespace std contains all the classes, objects and functions of the standard C++ library.
int main(): Initiates the funtion main, which is the main function of the program. Think of it as the trunk of the tree.
{ CODE }: The coding of int main() goes between the parentheses
cout: Stands for console output
<<: The << operator inserts the data that follows it into the stream preceding it.
"TXT": What to output onto the screen.
Return 0; Returns the function to the value 0
; All commands end in a semi-colon


But what happens if you want to end the line, and start what you next write on the line below? No, you do not have to do spaces until the line is full! All you have to do is either:

Code:
cout << "Line one" << endl;
cout << "Line two";

OR

cout << "Line one\nLine two";

OR

cout << "Line one\n";
cout << "Line two";
Thats it for today, ill post up another tut tomorrow about VARIABLES so you can learn to INPUT.

Credits:
Juan Soulie
P0SEID0N
#1 · edited 16y ago · 16y ago
[C]hosen-1
[C]hosen-1
ns bro, ill learn this all ty
#2 · 16y ago
Spookerzz
Spookerzz
Is this completely your guide?
#3 · 16y ago
NI
ninlover000
hello,

im completely new to this. After I compiled and ran it, a window popped up saying sup bitches, but the window only remained for half a second and closed. it kept doing that when i kept running it again and again. is it supposed to be like that?
#4 · 16y ago
P0
P0SEID0N
Quote Originally Posted by Godlike View Post
Is this completely your guide?
100% Written by me except for the extract from Juan Soulie
Quote Originally Posted by ninlover000 View Post
hello,

im completely new to this. After I compiled and ran it, a window popped up saying sup bitches, but the window only remained for half a second and closed. it kept doing that when i kept running it again and again. is it supposed to be like that?
#5 · 16y ago
Time
[MPGH]Time
Goood job man.
#6 · 16y ago
Posts 1–6 of 6 · Page 1 of 1

Post a Reply

Similar Threads

  • Learn how to code C++ || Day 2 - Basic OutputBy P0SEID0N in C++/C Programming
    2Last post 16y ago
  • Learn how to code C++ || Day 1 - CompilerBy P0SEID0N in CrossFire Hack Coding / Programming / Source Code
    14Last post 16y ago
  • Learn how to code C++ || Day 1 - CompilerBy P0SEID0N in C++/C Programming
    5Last post 16y ago
  • Learn how to code C++ || Day 3 - Variables and Date TypesBy P0SEID0N in C++/C Programming
    5Last post 16y ago
  • Learn how to code C++ || Day 3 - Variables and Date TypesBy P0SEID0N in CrossFire Hack Coding / Programming / Source Code
    8Last post 16y ago

Tags for this Thread

None