|
-
December 28th, 2011, 04:41 PM
#6
Re: Variable name
This is what I have been thinking:
class lessthan10
{
public:
int a;
lessthan10() {cout<<"Bad data"; //etc.}
};
Now in the original function, if it had been:
void myfunc(int a, string b);
How would the user call it:
myfunc(1000, string b);
This would not work. Wouldn't the user need to define an object first, etc.
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|