Click here to Skip to main content
15,850,265 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Assigning pointers from one class to another and Pin
Vaclav_15-Oct-16 7:12
Vaclav_15-Oct-16 7:12 
GeneralRe: Assigning pointers from one class to another and Pin
leon de boer15-Oct-16 18:16
leon de boer15-Oct-16 18:16 
GeneralRe: Assigning pointers from one class to another and Pin
Vaclav_19-Oct-16 5:54
Vaclav_19-Oct-16 5:54 
GeneralRe: Assigning pointers from one class to another and Pin
leon de boer19-Oct-16 8:45
leon de boer19-Oct-16 8:45 
NewsHow to provide a Security to a proprietary software or presemtation. Pin
Member 1278313512-Oct-16 21:03
Member 1278313512-Oct-16 21:03 
GeneralRe: How to provide a Security to a proprietary software or presemtation. Pin
jeron113-Oct-16 5:15
jeron113-Oct-16 5:15 
GeneralRe: How to provide a Security to a proprietary software or presemtation. Pin
leon de boer13-Oct-16 9:17
leon de boer13-Oct-16 9:17 
Questionclass is missing "type" - why ? Pin
Vaclav_12-Oct-16 16:00
Vaclav_12-Oct-16 16:00 
<b>Never mind, instead of trying to find the bug in my code I am going to rebuild the classes,
they need clean-up anyway.</b>

I have , so far , two relatively similar classes dealing with embedded processor hardware.
Here is a code snippet,

....

class IDE_USBD;
class IDE_HCD;

class IDE_ILI9341
{
public:
class IDE_HCD hcd;
class IDE_USBD usbd();
....


If I do not include parenthesizes in implementation of class IDE_USBD I get this error

IDE_ILI9341.h:371: error: field 'usbd' has incomplete type
class IDE_USBD usbd;
^
exit status 1
field 'usbd' has incomplete type


If I add them to class IDE_HCD hcd(); than I get this error:

gpf_isr = hcd.UOTGHS_Handler;
^
IDE_ILI9341.h:2351: error: '((IDE_ILI9341*)this)->IDE_ILI9341::hcd' does not have class type
hcd.HCD_Init();
^
exit status 1
'((IDE_ILI9341*)this)->IDE_ILI9341::hcd' does not have class type


Both classes have #include files before the IDE_ILI9341 gets implemented , I checked that.

Now adding or removing parentheses makes it work, it ain't broke , but why are the parenthesizes needed for IDE_USBD?

BTW that class has only default constructor implemented at this time.

Help solving this puzzle will be appreciated.
Cheers
Vaclav

-- modified 12-Oct-16 23:13pm.
AnswerRe: class is missing "type" - why ? PinPopular
leon de boer12-Oct-16 18:45
leon de boer12-Oct-16 18:45 
AnswerRe: class is missing "type" - why ? Pin
Graham Breach13-Oct-16 0:11
Graham Breach13-Oct-16 0:11 
QuestionObject Creation of an class? Pin
Mathan_CodeProject11-Oct-16 6:17
Mathan_CodeProject11-Oct-16 6:17 
AnsweralternatRe: Object Creation of an class? Pin
leon de boer11-Oct-16 6:50
leon de boer11-Oct-16 6:50 
GeneralRe: alternatRe: Object Creation of an class? Pin
Mathan_CodeProject12-Oct-16 0:02
Mathan_CodeProject12-Oct-16 0:02 
AnswerRe: Object Creation of an class? Pin
Krishnakumartg11-Oct-16 20:46
Krishnakumartg11-Oct-16 20:46 
GeneralRe: Object Creation of an class? Pin
Mathan_CodeProject12-Oct-16 0:01
Mathan_CodeProject12-Oct-16 0:01 
AnswerRe: Object Creation of an class? Pin
Midi_Mick11-Oct-16 23:13
professionalMidi_Mick11-Oct-16 23:13 
GeneralRe: Object Creation of an class? Pin
Mathan_CodeProject12-Oct-16 0:01
Mathan_CodeProject12-Oct-16 0:01 
QuestionC++ syntax Pin
Ratul Thakur10-Oct-16 22:35
Ratul Thakur10-Oct-16 22:35 
AnswerRe: C++ syntax Pin
CPallini10-Oct-16 22:49
mveCPallini10-Oct-16 22:49 
AnswerRe: C++ syntax Pin
Richard MacCutchan10-Oct-16 22:50
mveRichard MacCutchan10-Oct-16 22:50 
AnswerRe: C++ syntax Pin
David Crow11-Oct-16 7:20
David Crow11-Oct-16 7:20 
QuestionOne more error using function pointers - void value not ignored as it ought to be Pin
Vaclav_9-Oct-16 7:18
Vaclav_9-Oct-16 7:18 
AnswerRe: One more error using function pointers - void value not ignored as it ought to be Pin
Richard MacCutchan9-Oct-16 7:36
mveRichard MacCutchan9-Oct-16 7:36 
GeneralRe: One more error using function pointers - void value not ignored as it ought to be Pin
Vaclav_9-Oct-16 8:53
Vaclav_9-Oct-16 8:53 
GeneralRe: One more error using function pointers - void value not ignored as it ought to be Pin
leon de boer10-Oct-16 0:11
leon de boer10-Oct-16 0:11 

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.