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 › Starting to learn c++

Starting to learn c++

Posts 1–7 of 7 · Page 1 of 1
KI
kingnoobe
Starting to learn c++
I need just a little help getting started.. I'm understanding most of it *not that I'm far or anything*. But I don't get the braces.

#include <iostream>

using namespace std;

int main()
{
cout<<"HEY, you, I'm alive! Oh, and Hello World!\n";
cin.get();
}

Why couldn't I use a semicolon after int main and cin.get... Instead of using the braces.. Is it because int main is a function thus requires the braces.. And cin.get is that because its a function, but why does it have the semicolon then if its already ended. I actually get the rest of that...cout...#include <iostream>..etc...

I know I'm a complete newb, but hey we all had to start somewhere, and this tut. does seem pretty good just isn't quite clear on this.
#1 · 18y ago
SK
skittlznick2
It would be much easier to just do

cout << "whatever you put here"<< endl;
cin >> whatever u named it;

You couldnt put a semicolon after int main because thats not a line of code really...same thing with cin im terrible at explaining..
#2 · edited 18y ago · 18y ago
phantomfury
phantomfury
The code I use for (Hello World):
(Remember I was using the CLR Application)
Code:
#include <iostream>

using namespace std;

int main (void)
{
     Cout<<"Your message here!n";
     system("PAUSE")'
     return 0;
}
#3 · 18y ago
SI
Sinful
Um, i'm fairly new myself but { and } just mean start and end of a code block. int main() is indeed a function, it's the main function where all or most of your code will execute. More or less it's just a open and close to a funtction. The semicolen is there just as end each line in the function. Correct me if i'm wrong.
#4 · edited 18y ago · 18y ago
SH
ShabbaStoney
int main() is your function. the get() in cin.get() is some one elses function that you are calling. Think of the semi colons as representing different commands. I.e. cout << .... ; is the first command the computer executes then it goes right done that what next! ahhhhh cin.get(); do that nothing else? ok see ya!

Hoepfully that will clear things up I'm not too good at explaining things :P
#5 · 18y ago
DJ
djtrickdog
im guessing you are using cin.get to wait for a user to press a key?
instead use:
Code:
getchar();
or
Code:
System("pause"); //outputs "Press a key to continue"
or
Code:
System("pause>nul"); //no output
and use return 0; before the final bracket "}"
#6 · 18y ago
Oneirish
Oneirish
Go to cplusplus.com - The C++ Resources Network and do their tutorials. That's where I learned it...
#7 · 18y ago
Posts 1–7 of 7 · Page 1 of 1

Post a Reply

Similar Threads

  • A place to start to learn C++By DawgiiStylz in General
    5Last post 16y ago
  • I'm starting to learn..By Jessika in General
    44Last post 15y ago
  • Starting to learn making hacks.By SofaKingH4rd in General
    19Last post 15y ago
  • HELP: What other programs do I need to learn/start hacking?By ronyoung08 in General Hacking
    0Last post 18y ago
  • I wanne start learning Assembly plz read.!By Niratsio in Visual Basic Programming
    14Last post 18y ago

Tags for this Thread

#learn#starting