Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 struct/typedef is not found with typedef syntax

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
xMRi Posted - Mar 03 2008 : 08:33:17 AM
The follwing code is valid.
But if used neither AGOVD_CMD nor AGOVD_LOGON is known by VAX.


typedef struct tagAGOVD_HDR
{
	DWORD	m_dwSize;	
	DWORD	m_dwCommand;	
} AGOVD_HDR;

#define AGOVD_MAX_CMD_LENGTH	512

typedef struct tagAGOVD_CMD : public AGOVD_HDR
{
	BYTE	m_buffer[AGOVD_MAX_CMD_LENGTH-sizeof(AGOVD_HDR)];
} AGOVD_CMD;

typedef struct tagAGOVD_LOGON : public AGOVD_HDR
{
	LONG	m_lIdUser;
	LONG	m_lIdPjState;
	WCHAR	m_szServerName[64+1];
	WCHAR	m_szDBName[64+1];
	WCHAR	m_szCallbackNo[64+1];
} AGOVD_LOGON;



If I splitt the struct definition and typedef into 2 statements it works.
4   L A T E S T    R E P L I E S    (Newest First)
support Posted - Jan 27 2009 : 9:22:23 PM
case=2302 is fixed in build 1715
feline Posted - Mar 03 2008 : 10:18:20 AM
Very true, and rather obvious when I see it
xMRi Posted - Mar 03 2008 : 09:53:44 AM
Than it is better to use 2 statements:


struct tagAGOVD_CMD : public AGOVD_HDR
{
	BYTE	m_buffer[AGOVD_MAX_CMD_LENGTH-sizeof(AGOVD_HDR)];
};
typedef tagAGOVD_CMD AGOVD_CMD;


This works too!
feline Posted - Mar 03 2008 : 09:31:10 AM
I thought I recognised this:

case=2302

An alternative workaround is to use a #define for typedef struct, e.g.

#define FELINE_STRUCT typedef struct

FELINE_STRUCT tagAGOVD_CMD : public AGOVD_HDR
{
	BYTE	m_buffer[AGOVD_MAX_CMD_LENGTH-sizeof(AGOVD_HDR)];
} AGOVD_CMD;


and add the line:

#define FELINE_STRUCT class

to VA's stdafx.h file.

http://docs.wholetomato.com?W302

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000