Click here to Skip to main content
15,898,035 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: window styles Pin
p_19607-Apr-09 4:42
p_19607-Apr-09 4:42 
GeneralRe: window styles Pin
Chris Losinger7-Apr-09 4:49
professionalChris Losinger7-Apr-09 4:49 
GeneralRe: window styles Pin
p_19607-Apr-09 5:45
p_19607-Apr-09 5:45 
GeneralRe: window styles Pin
David Crow7-Apr-09 6:15
David Crow7-Apr-09 6:15 
QuestionException while using CComPtr<msxml::ixmldomdocument xmlns:msxml="#unknown"></msxml::ixmldomdocument> Pin
V K 27-Apr-09 4:01
V K 27-Apr-09 4:01 
QuestionRe: Exception while using CComPtr Pin
Roger Stoltz7-Apr-09 4:16
Roger Stoltz7-Apr-09 4:16 
AnswerRe: Exception while using CComPtr Pin
Stuart Dootson7-Apr-09 8:08
professionalStuart Dootson7-Apr-09 8:08 
Questionerror C2227: left of '-&gt;arr' must point to class/struct/union/generic type, but works in Pin
soongez7-Apr-09 4:00
soongez7-Apr-09 4:00 
okay I've created a program that has a 2D array that I want to display and edit. The class I created is called CChannel.

I'm using SDI to display it, in the View class I have defined this,
m_pChans = GetDocument()->GetChan();


m_chan is defined, CChannel m_chan;
GetChan() is this.

CChannel* GetChan() {
		return &m_chan;
	}


CChannel has an array defined in it called,
int arr[16][3600];

Okay, so within my View file I run the lines,
m_pChans->arr[i][j]=1;

that works fine and updates the array good, but when I copy this code in a function then try call it called from another file I get problems. First it asks me to make that function static, I'm not sure why,

error C2352: 'CUCPView::UpdateOutputs' : illegal call of non-static member function


so I make the function static, then it has this error,

error C2227: left of '->arr' must point to class/struct/union/generic type


I don't understand why it works within View, but when I try to use it in a function and make it static it doesn't work. I've been trying to look up the error codes and such, but with no luck. Could someone please help me with this.

I'll post more code if needed, but this already is pretty long
Cheers
AnswerRe: error C2227: left of '-&gt;arr' must point to class/struct/union/generic type, but works in Pin
Cedric Moonen7-Apr-09 4:19
Cedric Moonen7-Apr-09 4:19 
AnswerRe: error C2227: left of '-&gt;arr' must point to class/struct/union/generic type, but works in Pin
Roger Stoltz7-Apr-09 4:25
Roger Stoltz7-Apr-09 4:25 
GeneralRe: error C2227: left of '-&gt;arr' must point to class/struct/union/generic type, but works in Pin
soongez7-Apr-09 4:58
soongez7-Apr-09 4:58 
GeneralRe: error C2227: left of '-&gt;arr' must point to class/struct/union/generic type, but works in Pin
Roger Stoltz7-Apr-09 5:21
Roger Stoltz7-Apr-09 5:21 
GeneralRe: error C2227: left of '-&gt;arr' must point to class/struct/union/generic type, but works in Pin
soongez7-Apr-09 5:39
soongez7-Apr-09 5:39 
AnswerRe: error C2227: left of '-&gt;arr' must point to class/struct/union/generic type, but works in Pin
Roger Stoltz7-Apr-09 6:06
Roger Stoltz7-Apr-09 6:06 
GeneralRe: error C2227: left of '-&gt;arr' must point to class/struct/union/generic type, but works in Pin
soongez7-Apr-09 6:34
soongez7-Apr-09 6:34 
Questionondraw Pin
p_19607-Apr-09 3:24
p_19607-Apr-09 3:24 
QuestionRe: ondraw Pin
David Crow7-Apr-09 3:28
David Crow7-Apr-09 3:28 
AnswerWelcome in the CP's Members Memorable Quotes! Pin
CPallini7-Apr-09 7:08
mveCPallini7-Apr-09 7:08 
AnswerRe: ondraw Pin
Alan Balkany7-Apr-09 3:59
Alan Balkany7-Apr-09 3:59 
QuestionBegin C++ Pin
yesu prakash7-Apr-09 2:49
yesu prakash7-Apr-09 2:49 
QuestionRe: Begin C++ Pin
David Crow7-Apr-09 3:03
David Crow7-Apr-09 3:03 
AnswerRe: Begin C++ Pin
yesu prakash7-Apr-09 3:08
yesu prakash7-Apr-09 3:08 
GeneralRe: Begin C++ Pin
David Crow7-Apr-09 3:13
David Crow7-Apr-09 3:13 
Questionauto_ptr Pin
sashoalm7-Apr-09 2:45
sashoalm7-Apr-09 2:45 
AnswerRe: auto_ptr Pin
Sarath C7-Apr-09 3:43
Sarath C7-Apr-09 3:43 

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

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