Click here to Skip to main content
11,428,876 members (63,769 online)

C / C++ / MFC

 
GeneralRe: Inability to edit .rc files Pin
Anthony Appleyard20-Jan-13 23:51
memberAnthony Appleyard20-Jan-13 23:51 
GeneralRe: Inability to edit .rc files Pin
CPallini21-Jan-13 0:04
mvpCPallini21-Jan-13 0:04 
GeneralRe: Inability to edit .rc files Pin
Anthony Appleyard21-Jan-13 1:00
memberAnthony Appleyard21-Jan-13 1:00 
GeneralRe: Inability to edit .rc files Pin
Richard MacCutchan21-Jan-13 1:06
mvpRichard MacCutchan21-Jan-13 1:06 
GeneralRe: Inability to edit .rc files Pin
CPallini21-Jan-13 1:14
mvpCPallini21-Jan-13 1:14 
GeneralRe: Inability to edit .rc files Pin
Joe Woodbury22-Jan-13 10:20
memberJoe Woodbury22-Jan-13 10:20 
GeneralRe: Inability to edit .rc files Pin
CPallini22-Jan-13 10:41
mvpCPallini22-Jan-13 10:41 
AnswerRe: Inability to edit .rc files Pin
Max_Power_Up26-Feb-13 7:02
memberMax_Power_Up26-Feb-13 7:02 
GeneralRe: Inability to edit .rc files Pin
Anthony Appleyard26-Feb-13 7:39
memberAnthony Appleyard26-Feb-13 7:39 
QuestionUser privileges stopping a program from rename(,)'ing files [modified] Pin
Anthony Appleyard20-Jan-13 19:51
memberAnthony Appleyard20-Jan-13 19:51 
AnswerRe: User privileges stopping a program from rename(,)'ing files Pin
Super Lloyd20-Jan-13 20:52
memberSuper Lloyd20-Jan-13 20:52 
GeneralBUG FOUND [modified] Pin
Anthony Appleyard21-Jan-13 1:03
memberAnthony Appleyard21-Jan-13 1:03 
GeneralRe: BUG FOUND Pin
Super Lloyd21-Jan-13 1:57
memberSuper Lloyd21-Jan-13 1:57 
QuestionA pointer reference as l-value [modified] Pin
George Nistor20-Jan-13 3:07
memberGeorge Nistor20-Jan-13 3:07 
hi
Here is my problem:
I don't understand why in the following code the second line is error and the third is ok.
In the first case where the error is I will get a copy and in the second reference to the pointer.
Why the reference is considered l-value?

// Node class
class Node {
private:
	int key;
	Node* left;
	Node* right;
 
	typedef Node* Link;
public:
	Node() { key=-1; left=NULL; right=NULL;};
	void setKey(int aKey) { key = aKey; };
	int Key() { return key; };
	Link Left() { return left; };
	Link& Right() { return right; };
};
 
int _tmain(int argc, _TCHAR* argv[])
{
	Node *p= new Node();
	p->Left()= new Node(); //error : error C2106: '=' : left operand must be l-value
	
	p->Right()= new Node(); //this one is lvalue
	
	return 0;
}


modified 20-Jan-13 8:56am.

AnswerRe: A pointer reference as l-value Pin
Maximilien20-Jan-13 4:18
memberMaximilien20-Jan-13 4:18 
AnswerRe: A pointer reference as l-value Pin
Richard MacCutchan20-Jan-13 4:56
mvpRichard MacCutchan20-Jan-13 4:56 
GeneralRe: A pointer reference as l-value Pin
George Nistor20-Jan-13 5:02
memberGeorge Nistor20-Jan-13 5:02 
GeneralRe: A pointer reference as l-value Pin
Richard MacCutchan20-Jan-13 5:11
mvpRichard MacCutchan20-Jan-13 5:11 
GeneralRe: A pointer reference as l-value Pin
Freak3021-Jan-13 5:43
memberFreak3021-Jan-13 5:43 
GeneralRe: A pointer reference as l-value [modified] Pin
George Nistor21-Jan-13 6:37
memberGeorge Nistor21-Jan-13 6:37 
GeneralRe: A pointer reference as l-value Pin
Freak3021-Jan-13 23:08
memberFreak3021-Jan-13 23:08 
QuestionThe 'rename' function gives errno == -1 Pin
Anthony Appleyard20-Jan-13 2:12
memberAnthony Appleyard20-Jan-13 2:12 
AnswerRe: The 'rename' function gives errno == -1 Pin
pasztorpisti20-Jan-13 2:26
memberpasztorpisti20-Jan-13 2:26 
GeneralRe: The 'rename' function gives errno == -1 Pin
Anthony Appleyard20-Jan-13 4:01
memberAnthony Appleyard20-Jan-13 4:01 
AnswerRe: The 'rename' function gives errno == -1 Pin
Richard MacCutchan20-Jan-13 4:50
mvpRichard MacCutchan20-Jan-13 4:50 
GeneralRe: The 'rename' function gives errno == -1 Pin
Anthony Appleyard20-Jan-13 5:32
memberAnthony Appleyard20-Jan-13 5:32 
GeneralRe: The 'rename' function gives errno == -1 Pin
Richard MacCutchan20-Jan-13 5:37
mvpRichard MacCutchan20-Jan-13 5:37 
GeneralRe: The 'rename' function gives errno == -1 Pin
Anthony Appleyard20-Jan-13 6:02
memberAnthony Appleyard20-Jan-13 6:02 
GeneralRe: The 'rename' function gives errno == -1 Pin
Richard MacCutchan20-Jan-13 6:04
mvpRichard MacCutchan20-Jan-13 6:04 
GeneralRe: The 'rename' function gives errno == -1 [modified] Pin
Anthony Appleyard20-Jan-13 6:11
memberAnthony Appleyard20-Jan-13 6:11 
GeneralRe: The 'rename' function gives errno == -1 Pin
Richard MacCutchan20-Jan-13 6:33
mvpRichard MacCutchan20-Jan-13 6:33 
GeneralRe: The 'rename' function gives errno == -1 Pin
Anthony Appleyard20-Jan-13 6:57
memberAnthony Appleyard20-Jan-13 6:57 
GeneralRe: The 'rename' function gives errno == -1 Pin
Richard MacCutchan20-Jan-13 7:20
mvpRichard MacCutchan20-Jan-13 7:20 
GeneralRe: The 'rename' function gives errno == -1 [modified] Pin
Anthony Appleyard20-Jan-13 12:03
memberAnthony Appleyard20-Jan-13 12:03 
GeneralRe: The 'rename' function gives errno == -1 Pin
Richard MacCutchan20-Jan-13 22:52
mvpRichard MacCutchan20-Jan-13 22:52 
GeneralRe: The 'rename' function gives errno == -1 [modified] Pin
Anthony Appleyard20-Jan-13 23:11
memberAnthony Appleyard20-Jan-13 23:11 
GeneralRe: The 'rename' function gives errno == -1 Pin
Richard MacCutchan21-Jan-13 0:00
mvpRichard MacCutchan21-Jan-13 0:00 
QuestionRe: The 'rename' function gives errno == -1 Pin
DavidCrow20-Jan-13 16:17
memberDavidCrow20-Jan-13 16:17 
AnswerRe: The 'rename' function gives errno == -1 Pin
Anthony Appleyard20-Jan-13 19:15
memberAnthony Appleyard20-Jan-13 19:15 
GeneralRe: The 'rename' function gives errno == -1 Pin
Richard MacCutchan20-Jan-13 5:49
mvpRichard MacCutchan20-Jan-13 5:49 
AnswerRe: The 'rename' function gives errno == -1 Pin
jschell20-Jan-13 7:13
memberjschell20-Jan-13 7:13 
GeneralBANZAI :: bug found [modified] Pin
Anthony Appleyard21-Jan-13 0:50
memberAnthony Appleyard21-Jan-13 0:50 
QuestionIs there a way to trace an mpi message through a topology? Pin
Cioroiu Adrian-Nicu19-Jan-13 7:39
memberCioroiu Adrian-Nicu19-Jan-13 7:39 
AnswerRe: Is there a way to trace an mpi message through a topology? Pin
Richard MacCutchan19-Jan-13 22:32
mvpRichard MacCutchan19-Jan-13 22:32 
QuestionSOLVED Cannot access #include files – “permission denied” [modified] Pin
Vaclav_Sal19-Jan-13 5:38
memberVaclav_Sal19-Jan-13 5:38 
AnswerRe: Cannot access #include files – “permission denied” Pin
Richard MacCutchan19-Jan-13 6:23
mvpRichard MacCutchan19-Jan-13 6:23 
GeneralRe: Cannot access #include files – “permission denied” Pin
Vaclav_Sal19-Jan-13 8:09
memberVaclav_Sal19-Jan-13 8:09 
GeneralRe: Cannot access #include files – “permission denied” Pin
Richard MacCutchan19-Jan-13 8:11
mvpRichard MacCutchan19-Jan-13 8:11 
GeneralRe: Cannot access #include files – “permission denied” Pin
Vaclav_Sal19-Jan-13 13:02
memberVaclav_Sal19-Jan-13 13:02 
GeneralRe: Cannot access #include files – “permission denied” Pin
Richard MacCutchan19-Jan-13 22:26
mvpRichard MacCutchan19-Jan-13 22:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.150428.2 | Last Updated 3 May 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid