This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes C / C++ and the fly likes functions and storage class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Languages » C / C++
Bookmark "functions and storage class" Watch "functions and storage class" New topic
Author

functions and storage class

aaka jain
Greenhorn

Joined: May 16, 2013
Posts: 12
void fun(auto int _){
print("%d",_);
}
main(){
fun(23);
return 0;
}

this program is giving me an error relating to storage class ,if we are using atatic in place of auto then also it is giving me an error,can somebody please explain me why i m getting an error in both the cases and how can i solve this error,thanks
Mike Blaszczak
Greenhorn

Joined: Sep 02, 2013
Posts: 22
Hopefully, you're not planning on using "_" as a variable name.

Paramters to functions can't accept "auto" or "static" as modifiers. You can solve your problem by not using those modifiers. This code is correct:




... though it still uses that terrible variable name.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: functions and storage class
 
Similar Threads
Cannot open socket for LIME events on port 1484
Calling a method
Varargs overloading problem
Multithread program from khalid mughal
how to export schema from Visualage 3.5 to 4.0