14 Replies - 40801 Views - Last Post: 08 June 2013 - 08:15 AM Rate Topic: -----

#1 usamayo  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 17-April 11

how to run a program in visual c++ 2010?

Posted 24 April 2011 - 12:51 AM

I have written a program in visual studio 2010 but cannot find the "compile and run button". Can someone help?
Is This A Good Question/Topic? 0
  • +

Replies To: how to run a program in visual c++ 2010?

#2 JaKWaC  Icon User is offline

  • D.I.C Head

Reputation: 76
  • View blog
  • Posts: 234
  • Joined: 15-November 10

Re: how to run a program in visual c++ 2010?

Posted 24 April 2011 - 01:01 AM

I'd assume its in the debug menu.
Was This Post Helpful? 0
  • +
  • -

#3 usamayo  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 17-April 11

Re: how to run a program in visual c++ 2010?

Posted 24 April 2011 - 01:03 AM

View PostJaKWaC, on 24 April 2011 - 01:01 PM, said:

I'd assume its in the debug menu.

No its not
Was This Post Helpful? 0
  • +
  • -

#4 JaKWaC  Icon User is offline

  • D.I.C Head

Reputation: 76
  • View blog
  • Posts: 234
  • Joined: 15-November 10

Re: how to run a program in visual c++ 2010?

Posted 24 April 2011 - 01:10 AM

Go to Tools->Settings and select Expert
Was This Post Helpful? 0
  • +
  • -

#5 usamayo  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 17-April 11

Re: how to run a program in visual c++ 2010?

Posted 24 April 2011 - 01:11 AM

View PostJaKWaC, on 24 April 2011 - 01:10 PM, said:

Go to Tools->Settings and select Expert

I have done that but its of no use
Was This Post Helpful? 0
  • +
  • -

#6 JaKWaC  Icon User is offline

  • D.I.C Head

Reputation: 76
  • View blog
  • Posts: 234
  • Joined: 15-November 10

Re: how to run a program in visual c++ 2010?

Posted 24 April 2011 - 01:21 AM

You may have to close and reopen visual studio 2010. If that doesn't work, could you click your debug menu and then take a screen shot and post it? I'd be interested to see what is showing up.
Was This Post Helpful? 0
  • +
  • -

#7 newn  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 119
  • Joined: 22-April 09

Re: how to run a program in visual c++ 2010?

Posted 24 April 2011 - 02:57 AM

You could just simply click F5 on your keyboard. It will compile and run your program without any necessity of the mouse and "find a button" game.
Was This Post Helpful? 0
  • +
  • -

#8 usamayo  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 17-April 11

Re: how to run a program in visual c++ 2010?

Posted 24 April 2011 - 03:01 AM

View Postnewn, on 24 April 2011 - 02:57 PM, said:

You could just simply click F5 on your keyboard. It will compile and run your program without any necessity of the mouse and "find a button" game.

i have tried every possible way but couldn't find the solution and that's why i have posted this question.
Was This Post Helpful? 0
  • +
  • -

#9 usamayo  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 17-April 11

Re: how to run a program in visual c++ 2010?

Posted 24 April 2011 - 03:07 AM

View PostJaKWaC, on 24 April 2011 - 01:21 PM, said:

You may have to close and reopen visual studio 2010. If that doesn't work, could you click your debug menu and then take a screen shot and post it? I'd be interested to see what is showing up.

just check these screen shots.Attached ImageAttached ImageAttached Image
Was This Post Helpful? 0
  • +
  • -

#10 newn  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 119
  • Joined: 22-April 09

Re: how to run a program in visual c++ 2010?

Posted 24 April 2011 - 03:22 AM

That's interesting.
Can you compile this in a new project? (exit VS, start VS, create a new Win32 console project)
#include <iostream>
using namespace std;

int main()
{
    cout << "HI!";
    return 0;
}

Was This Post Helpful? 1
  • +
  • -

#11 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6063
  • View blog
  • Posts: 23,515
  • Joined: 23-August 08

Re: how to run a program in visual c++ 2010?

Posted 24 April 2011 - 04:37 AM

Best guess: you didn't create a project, you just typed code into a file. You need to create a Solution & Project in Visual Studio in order to build. Read this tutorial.
Was This Post Helpful? 0
  • +
  • -

#12 usamayo  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 17-April 11

Re: how to run a program in visual c++ 2010?

Posted 24 April 2011 - 07:31 AM

View PostJackOfAllTrades, on 24 April 2011 - 04:37 PM, said:

Best guess: you didn't create a project, you just typed code into a file. You need to create a Solution & Project in Visual Studio in order to build. Read this tutorial.

actually i created a new project and opened an empty file and wrote my complete code over there (if you are right then that's where i was actually wrong), but still in the other compilers i have used so far there was no such problem.:S

View Postnewn, on 24 April 2011 - 03:22 PM, said:

That's interesting.
Can you compile this in a new project? (exit VS, start VS, create a new Win32 console project)
#include <iostream>
using namespace std;

int main()
{
    cout << "HI!";
    return 0;
}

I will try.
Was This Post Helpful? 0
  • +
  • -

#13 Aphex19  Icon User is offline

  • Born again Pastafarian.
  • member icon

Reputation: 615
  • View blog
  • Posts: 1,873
  • Joined: 02-August 09

Re: how to run a program in visual c++ 2010?

Posted 24 April 2011 - 07:58 AM

View Postusamayo, on 24 April 2011 - 08:31 AM, said:

View PostJackOfAllTrades, on 24 April 2011 - 04:37 PM, said:

Best guess: you didn't create a project, you just typed code into a file. You need to create a Solution & Project in Visual Studio in order to build. Read this tutorial.

actually i created a new project and opened an empty file and wrote my complete code over there (if you are right then that's where i was actually wrong), but still in the other compilers i have used so far there was no such problem.:S

View Postnewn, on 24 April 2011 - 03:22 PM, said:

That's interesting.
Can you compile this in a new project? (exit VS, start VS, create a new Win32 console project)

I will try.


you're not using VC++ properly, it's not the fault of VC++. You need to file/new/project and create a new project, a consle application in your case. Then add your files using the solution explorer.

This post has been edited by Aphex19: 24 April 2011 - 07:58 AM

Was This Post Helpful? 0
  • +
  • -

#14 davanshu91  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 1
  • Joined: 08-June 13

Re: how to run a program in visual c++ 2010?

Posted 08 June 2013 - 02:51 AM

char holdExecutionWindowOpen;
std::cin >> holdExecutionWindowOpen;


try this in to ur code
Was This Post Helpful? -1
  • +
  • -

#15 Mrk  Icon User is offline

  • D.I.C Head

Reputation: 29
  • View blog
  • Posts: 66
  • Joined: 03-December 09

Re: how to run a program in visual c++ 2010?

Posted 08 June 2013 - 08:15 AM

What I always do, after I have compiled the source code, is just hit Ctrl F5 to run the program.......?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1