What is mean error?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • xtoma
    New Member
    • Feb 2015
    • 11

    #1

    What is mean error?

    hello,
    when i execute my program .
    appear to me this errors
    can you explain for me?

    thanks in advance

    [Error] expected initializer before 'int'
    [Error] 'i' was not declared in this scope


    Code:
    	void Queue::display()
    	
    	
    	int i;
    	
    	for( i=front;i<=rear;i++)
    	{
    		cout<<items[i]<<" ";
    	
    }
    
    	cout<<endl;
    
    }
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    You are missing the { at the beginning of the function.

    Comment

    • xtoma
      New Member
      • Feb 2015
      • 11

      #3
      thank you for reply weaknessforcats

      Comment

      Working...