Link to home
Start Free TrialLog in
Avatar of Mark_Co
Mark_CoFlag for United States of America

asked on

New user to C++ on a Mac using xcode. Trying to use IDE correctly

First, I'm very new to programming and C++ so if I made a huge flaw in the code below, forgive me...it's possible I screwed up bigtime. I am trying to make a very, very basic program just so I can get started using xcode on my Mac instead of codeblocks on my pc to compile C++ programs

#include <iostream>
using namespace std;

int main(int argc, const char * argv[])
{
    int a,b,c,d,e,f,g;
    cout << "Enter 6 numbers: ";
    cin >> a >> b >> c >> d >> e >> f >> g;
    cout << a << b;
    return 0;
}

Open in new window


The above code outputs:
Enter 6 numbers: 

Open in new window


when I type in the 6 numbers ( as '1 2 3 4 5 6')and hit enter, the rest of the program does not run(the   cout << a << b;). I tried running the program from bash also but that too was not working. I'm feeling really dumb right now. Can someone tell me what I'm doing wrong?
ASKER CERTIFIED SOLUTION
Avatar of Hamidreza Vakilian
Hamidreza Vakilian

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mark_Co

ASKER

Crap. I knew I was tired and made a stupid mistake. Sorry, and thank you
Avatar of Mark_Co

ASKER

i apologize for this stupid question. I went back to xcode and got it fixed right away. Going to bed now, hahaha