Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: C++
Expertise: Intermediate
Mar 5, 2001

Warnings Regarding Temporaries and Their Meaning


The following code causes a somewhat cryptic warning message:
 
struct Employee
{
 long ID;
 string name;
};

Employee emp;
void func(int& id) { id=0;}
// warning below issued for the following call:
func(emp.ID);

Danny Kalev
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap