Solving CMD Issues - Hello World Not Showing Up

  • Thread starter Thread starter killa57
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around a user's difficulty in running a "Hello World" program in C++. The user reports that the command prompt does not display the expected output after successful compilation, leading to inquiries about the programming environment and execution method.

Discussion Character

  • Technical explanation
  • Homework-related

Main Points Raised

  • The user initially reports that their command prompt does not display "Hello World" after running the program.
  • One participant asks for clarification on the programming language and the user's code.
  • The user shares their C++ code, which contains a typo in the output statement.
  • Another participant suggests that the user needs to run the program in a command prompt window and provides steps to do so.
  • The user later indicates that the issue was due to creating the project as a Windows application instead of a Console application.
  • The user expresses gratitude for the quick responses and indicates a willingness to post more questions in the future.

Areas of Agreement / Disagreement

Participants generally agree on the need to run the program in a command prompt for console applications, but the initial misunderstanding regarding the project type led to confusion. The discussion reflects a resolution to the user's problem without consensus on the initial execution method.

Contextual Notes

The user's code contains a typo ("count" instead of "cout"), which may have contributed to the confusion, but this was not explicitly addressed in the responses. The discussion does not resolve the implications of the project type on execution.

Who May Find This Useful

New programmers or students learning C++ who encounter issues with running console applications and need guidance on project setup and execution methods.

killa57
Messages
3
Reaction score
0
Hi all this is my first post and my first program trying to run you guessed it Hello World! okay i compiled it and it was successful but when i run it. my cmd dosent open i used the ;system("PAUSE") the command pops open but it just says to press any key to continue? it doesn't even show the the words hello world? How can i get it to show what i put in the code in the cmd prompt?
 
Technology news on Phys.org
You might start by giving us a clue as to what you're doing - what language, what your code looks like, things like that.
 
Im writing in C++ and this is the code

//my First Program//
#include <iostream>
using namespace std;
int main()
{
count <<"Hello World";
;return 0;
}
 
How are you trying to run it? This is a console application, so you will need to open a command prompt window for it to run in. Open a command prompt window, then navigate to the directory where the executable for your program is, then type the name of the executable. It should print Hello World.
 
Problem solved sorry guys i made the project as a windows application instead of making the project as a Console application from the start...
I did try the above methods but it just still just opened and closed fast...
But hey thanks guys yall were a quick respons ill have to post more problems as i come across them thanks guys :)
 

Similar threads

Replies
6
Views
3K
Replies
5
Views
2K
Replies
13
Views
2K
  • · Replies 19 ·
Replies
19
Views
6K
Replies
7
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 29 ·
Replies
29
Views
4K
Replies
4
Views
5K
  • · Replies 28 ·
Replies
28
Views
3K