Question about C++ syntax

Status
Not open for further replies.

fatma1000

Banned
Joined
Apr 30, 2006
Messages
147
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,298
Location
eygpt
Activity points
0
is it posseble to do like this
main()
int x;
float y;
{
----------------
--------------
-----------------
}
regards
 

help6 c++

No. Isn't possible
 

help6 c++

Nope sorry. Not gonna work.
Why you wanna do that?
 

Re: help6 c++

main()
{
int a;
float b;
--------------
----------------
------------

}
 

Re: help6 c++

why would you even want to do anything like that???
what you can do is
Code:
int main() 
{
int a;
float b;
// ---------------
//------------
//----------------

}
it really doesn't do anything useful though.
 

help6 c++

this is better:
int main ( void ) // void - because we don't parse argument string of program
{
int a;
float b;
// ---------------
//------------
//----------------
return 0; // because we write int main, so it must return some value to OS
}
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…