473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Hello World Program

#include<iostream>
int main(void)
{
std::cout << "Hello World" << std::<<endl;
return 0;
}
I am compiling it on my linux box (rhel 5) using g++ hello.cpp -o
hello.o and
to my astonishment i am getting the following errors!

hello.cpp: In function 'int main()':
hello.cpp:5: error: expected unqualified-id before '<<' token
hello.cpp:5: error: 'endl' was not declared in this scope
It does look to be a very stupid question ,please pardon me for my
ignorance
in using Linux n g++ .Kindly help me out..
Nov 29 '07 #1
1 1716
On Nov 29, 8:05 pm, "rhle.freak" <rhle.fr...@gmail.comwrote:
#include<iostream>
int main(void)
{
std::cout << "Hello World" << std::<<endl;
return 0;

}
it should have been <<std::endl;
My fault..Please ignore the message
Nov 29 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Rahul Gandhi | last post by:
Hi guys, I'm trying to run small program helloworld.cpp. But i'm not getting any output on the stdout program is #include<iostream.h> main(){ cout<<"hello world"; }
3
by: penguinman | last post by:
Its just a hello world program. Compile and build goes with no warning or error. i type ./a.out and the shell just sits there. It doesnt hang but it just sits there with no output. I executed...
9
by: PG | last post by:
Hi gurus, I have AIX visual age C++ compiler version 5.0.2.3. I have a simple hello world program that gives compilation errors. Any help will be appreciated. Thanks PG ***test.cpp**** ...
33
by: ankursinha | last post by:
Hi, Is it possible to write a C program that prints "Hello World" on screen without having a single semi-colon in the entire program? The extra constraint here is that u r not allowed to use...
42
by: Prashanth Badabagni | last post by:
Hi, Can any body tell me how to print "hello,world" with out using semicolon Thanks in advance .. Bye Prashanth Badabagni
26
by: Santanu Chatterjee | last post by:
Hello all, I would like to know how an OS makes a computer boot up. For that, as a start I would like to see an e_ample (read the underscore as the letter before y, as the keyboard here is...
8
by: vijay | last post by:
Hello, As the subject suggests, I need to print the string in the reverse order. I made the following program: # include<stdio.h> struct llnode { char *info;
1
by: Tarique Jawed | last post by:
Alright - I've been using VS .NET for all of 3 hours now - so pardon the stupidity of my question. Can someone walk me through a simple hello world that outputs to console, in terms of which...
2
by: Sourcerer | last post by:
I'm making a "hello world" program in C#, though a bit more complex one. When I click on a button in my program, it is supposed to open a program (say, Notepad) - that I did, by opening Notepad...
1
by: James T. Dennis | last post by:
You'd think that using things like gettext would be easy. Superficially it seems well documented in the Library Reference(*). However, it can be surprisingly difficult to get the external details...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.