is there anyway to print out any string on stdout without using semicolon at the end... ?? plzz reply
harshchandra -3 Junior Poster in Training
Recommended Answers
Jump to PostI have no idea what you just asked. Be more specific.
Jump to PostOh, is this the "hello world without a semicolon" problem with a C++ twist?
#include <iostream> int main() { if ( std::cout<<"Hello, world!"<<std::endl ) { } }
Jump to Post>Nothing was returned
Standard C++ returns 0 by default. Returning from main can be tricky, especially if you switch languages and work with legacy code a lot. In pre-standard C++ you need to explicitly return a value. In C89 you need to explicitly return a value. In standard C++ and …
Jump to Post>isnt semicolon at the end of any statements a required syntax in C and C++??
What about compound statements?for ( ; ; ) { } // No semicolon if ( 1 ) { } // No semicolon
>if thats so, that cant be possible unless modifying …
Jump to Post>in C we don't need to specify int infront of main(),because it was a default in C.
Not anymore. The latest standard removed implicit int from the language. All of your code will now fail to compile. Sorry.>void means empty.
void means nothing.>that is the main …
All 21 Replies
Narue 5,707 Bad Cop Team Colleague
harshchandra -3 Junior Poster in Training
Narue 5,707 Bad Cop Team Colleague
harshchandra -3 Junior Poster in Training
Fasola 0 Junior Poster
Narue 5,707 Bad Cop Team Colleague
koder 0 Newbie Poster
iTaChi 19 Newbie Poster
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster
Narue 5,707 Bad Cop Team Colleague
ranjani -2 Newbie Poster
Salem 5,265 Posting Sage
ranjani -2 Newbie Poster
Salem 5,265 Posting Sage
Narue 5,707 Bad Cop Team Colleague
gopi kannan -2 Newbie Poster
findsyntax -6 Newbie Poster
Narue 5,707 Bad Cop Team Colleague
Nick Evan 4,005 Industrious Poster Team Colleague Featured Poster
Narue 5,707 Bad Cop Team Colleague
Nick Evan 4,005 Industrious Poster Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.