Menu

#24 Multiline declarations

open
None
5
2004-12-21
2004-11-18
Dracan
No

In our company, we have a coding standard, where we
need to declare variables on the next line; ie:

class_name
var1;

Intellisense doesn't seem to support this. Presumably,
this would also cause the same problem if your code was
like this:

class_name var1, var2, var3, var4,
var5, var6, var7, var8;

To test, try:

class test_class
{
int
integer_variable;
};

void main (void)
{
test_class
testing;

testing. // note that this is the bit that doesn't work
}

If the first line of the main function was written:

test_class testing;

then it works fine.

Discussion

  • Dracan

    Dracan - 2004-11-22

    Logged In: YES
    user_id=1161711

    Note that html has removed the tabbing in the code I
    included. Look at the html source to see the tabbing that I
    has meant.

     
  • Dracan

    Dracan - 2004-12-19
    • assigned_to: nobody --> dfishburn
     
  • David Fishburn

    David Fishburn - 2004-12-21
    • assigned_to: dfishburn --> rsivara1
     
  • Ravi Shankar

    Ravi Shankar - 2004-12-22

    Logged In: YES
    user_id=907360

    Ok, Thanks for reporting.

     

Log in to post a comment.

Auth0 Logo