Thread: Re: [Dev-C++] syntax error driving me crazy
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Daniel G. <sp...@ho...> - 2003-04-04 12:25:48
|
Have you defined imgs ? Does the compiler know what members are inside imgs? >From: "Vlada Djurovic" <dj...@im...> >To: "'DevC++ help'" <dev...@li...> >Subject: [Dev-C++] syntax error driving me crazy >Date: Fri, 4 Apr 2003 13:27:37 +0200 > >Hi. >Can somebody please tell me what is wrong with this peace of code? I get >"syntax error before '.'" in every line and can't figure out what's wrong. > >TBBUTTON imgs[2]; > >imgs[0].iBitmap=STD_FILENEW; >imgs[0].idCommand=ID_FILE_NEW; >imgs[0].fsState=TBSTATE_ENABLED; >imgs[0].fsStyle=BTNS_BUTTON; >imgs[0].dwData=0; >imgs[0].iString=0; > >imgs[1].iBitmap=STD_FILEOPEN; >imgs[1].idCommand=ID_FILE_OPEN; >imgs[1].fsState=TBSTATE_ENABLED; >imgs[1].fsStyle=BTNS_BUTTON; >imgs[1].dwData=0; >imgs[1].iString=0; > >Thanks. >------------ >Vlada > > > >------------------------------------------------------- >This SF.net email is sponsored by: ValueWeb: >Dedicated Hosting for just $79/mo with 500 GB of bandwidth! >No other company gives more support or power for your dedicated server >http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users _________________________________________________________________ On the move? Get Hotmail on your mobile phone http://www.msn.co.uk/mobile |
|
From: Daniel G. <sp...@ho...> - 2003-04-04 14:16:01
|
Try something like img.member and see if that works (should be a default of [0]). I'm a bit unsure, unfortunately. >From: "Vlada Djurovic" <dj...@im...> >To: "Daniel Glenfield" ><sp...@ho...>,<dev...@li...> >Subject: Re: [Dev-C++] syntax error driving me crazy >Date: Fri, 4 Apr 2003 14:45:59 +0200 > > >----- Original Message ----- >From: "Daniel Glenfield" <sp...@ho...> >To: <dj...@im...>; <dev...@li...> >Sent: Friday, April 04, 2003 2:25 PM >Subject: Re: [Dev-C++] syntax error driving me crazy > > > > > > > > > > Have you defined imgs ? Does the compiler know what members are inside >imgs? > > > >I'm not sure what you mean. imgs is declared as array of TBBUTON >structures, >and if I'm right, TBBUTTON is defined in commctrl.h, which is included in >my >source file. The compiler didn't complain about TBBUTTON being undefined. I >also linked comctl32 library. The code is the same as I found on MSDN, so >I >think it should work. > > > > >From: "Vlada Djurovic" <dj...@im...> > > >To: "'DevC++ help'" <dev...@li...> > > >Subject: [Dev-C++] syntax error driving me crazy > > >Date: Fri, 4 Apr 2003 13:27:37 +0200 > > > > > >Hi. > > >Can somebody please tell me what is wrong with this peace of code? I >get > > >"syntax error before '.'" in every line and can't figure out what's >wrong. > > > > > >TBBUTTON imgs[2]; > > > > > >imgs[0].iBitmap=STD_FILENEW; > > >imgs[0].idCommand=ID_FILE_NEW; > > >imgs[0].fsState=TBSTATE_ENABLED; > > >imgs[0].fsStyle=BTNS_BUTTON; > > >imgs[0].dwData=0; > > >imgs[0].iString=0; > > > > > >imgs[1].iBitmap=STD_FILEOPEN; > > >imgs[1].idCommand=ID_FILE_OPEN; > > >imgs[1].fsState=TBSTATE_ENABLED; > > >imgs[1].fsStyle=BTNS_BUTTON; > > >imgs[1].dwData=0; > > >imgs[1].iString=0; > > > > > >Thanks. > > >------------ > > >Vlada > > > > > > > > > > > >------------------------------------------------------- > > >This SF.net email is sponsored by: ValueWeb: > > >Dedicated Hosting for just $79/mo with 500 GB of bandwidth! > > >No other company gives more support or power for your dedicated server > > >http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ > > >_______________________________________________ > > >Dev-cpp-users mailing list > > >Dev...@li... > > >TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > > >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > > > _________________________________________________________________ > > On the move? Get Hotmail on your mobile phone >http://www.msn.co.uk/mobile > > > _________________________________________________________________ On the move? Get Hotmail on your mobile phone http://www.msn.co.uk/mobile |
|
From: Vlada D. <dj...@im...> - 2003-04-04 21:08:31
|
----- Original Message ----- From: "Daniel Glenfield" <sp...@ho...> To: <dj...@im...>; <dev...@li...> Sent: Friday, April 04, 2003 4:15 PM Subject: Re: [Dev-C++] syntax error driving me crazy > Try something like > > img.member > > and see if that works (should be a default of [0]). > > I'm a bit unsure, unfortunately. > > No, doesn't work. Can it be some bug in the compiler? I'm using version 4.9.5.0. > > >From: "Vlada Djurovic" <dj...@im...> > >To: "Daniel Glenfield" > ><sp...@ho...>,<dev...@li...> > >Subject: Re: [Dev-C++] syntax error driving me crazy > >Date: Fri, 4 Apr 2003 14:45:59 +0200 > > > > > >----- Original Message ----- > >From: "Daniel Glenfield" <sp...@ho...> > >To: <dj...@im...>; <dev...@li...> > >Sent: Friday, April 04, 2003 2:25 PM > >Subject: Re: [Dev-C++] syntax error driving me crazy > > > > > > > > > > > > > > > > Have you defined imgs ? Does the compiler know what members are inside > >imgs? > > > > > > >I'm not sure what you mean. imgs is declared as array of TBBUTON > >structures, > >and if I'm right, TBBUTTON is defined in commctrl.h, which is included in > >my > >source file. The compiler didn't complain about TBBUTTON being undefined. I > >also linked comctl32 library. The code is the same as I found on MSDN, so > >I > >think it should work. > > > > > > > >From: "Vlada Djurovic" <dj...@im...> > > > >To: "'DevC++ help'" <dev...@li...> > > > >Subject: [Dev-C++] syntax error driving me crazy > > > >Date: Fri, 4 Apr 2003 13:27:37 +0200 > > > > > > > >Hi. > > > >Can somebody please tell me what is wrong with this peace of code? I > >get > > > >"syntax error before '.'" in every line and can't figure out what's > >wrong. > > > > > > > >TBBUTTON imgs[2]; > > > > > > > >imgs[0].iBitmap=STD_FILENEW; > > > >imgs[0].idCommand=ID_FILE_NEW; > > > >imgs[0].fsState=TBSTATE_ENABLED; > > > >imgs[0].fsStyle=BTNS_BUTTON; > > > >imgs[0].dwData=0; > > > >imgs[0].iString=0; > > > > > > > >imgs[1].iBitmap=STD_FILEOPEN; > > > >imgs[1].idCommand=ID_FILE_OPEN; > > > >imgs[1].fsState=TBSTATE_ENABLED; > > > >imgs[1].fsStyle=BTNS_BUTTON; > > > >imgs[1].dwData=0; > > > >imgs[1].iString=0; > > > > > > > >Thanks. > > > >------------ > > > >Vlada > > > > > > > > > > > > > > > >------------------------------------------------------- > > > >This SF.net email is sponsored by: ValueWeb: > > > >Dedicated Hosting for just $79/mo with 500 GB of bandwidth! > > > >No other company gives more support or power for your dedicated server > > > >http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ > > > >_______________________________________________ > > > >Dev-cpp-users mailing list > > > >Dev...@li... > > > >TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > > > >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > > > > > > _________________________________________________________________ > > > On the move? Get Hotmail on your mobile phone > >http://www.msn.co.uk/mobile > > > > > > > > _________________________________________________________________ > On the move? Get Hotmail on your mobile phone http://www.msn.co.uk/mobile > |
|
From: Igor P. <igo...@po...> - 2003-04-04 14:32:03
|
Hi, Please tell us what was the first syntax error on the list. Regards Igor Pierscinski -----Original Message----- From: Vlada Djurovic [mailto:dj...@im...] Sent: Friday, April 04, 2003 2:46 PM To: Daniel Glenfield; dev...@li... Subject: Re: [Dev-C++] syntax error driving me crazy ----- Original Message ----- From: "Daniel Glenfield" <sp...@ho...> To: <dj...@im...>; <dev...@li...> Sent: Friday, April 04, 2003 2:25 PM Subject: Re: [Dev-C++] syntax error driving me crazy > > > > Have you defined imgs ? Does the compiler know what members are inside imgs? > I'm not sure what you mean. imgs is declared as array of TBBUTON = structures, and if I'm right, TBBUTTON is defined in commctrl.h, which is included = in my source file. The compiler didn't complain about TBBUTTON being = undefined. I also linked comctl32 library. The code is the same as I found on MSDN, = so I think it should work. > >From: "Vlada Djurovic" <dj...@im...> > >To: "'DevC++ help'" <dev...@li...> > >Subject: [Dev-C++] syntax error driving me crazy > >Date: Fri, 4 Apr 2003 13:27:37 +0200 > > > >Hi. > >Can somebody please tell me what is wrong with this peace of code? I = get > >"syntax error before '.'" in every line and can't figure out what's wrong. > > > >TBBUTTON imgs[2]; > > > >imgs[0].iBitmap=3DSTD_FILENEW; > >imgs[0].idCommand=3DID_FILE_NEW; > >imgs[0].fsState=3DTBSTATE_ENABLED; > >imgs[0].fsStyle=3DBTNS_BUTTON; > >imgs[0].dwData=3D0; > >imgs[0].iString=3D0; > > > >imgs[1].iBitmap=3DSTD_FILEOPEN; > >imgs[1].idCommand=3DID_FILE_OPEN; > >imgs[1].fsState=3DTBSTATE_ENABLED; > >imgs[1].fsStyle=3DBTNS_BUTTON; > >imgs[1].dwData=3D0; > >imgs[1].iString=3D0; > > > >Thanks. > >------------ > >Vlada > > > > > > > >------------------------------------------------------- > >This SF.net email is sponsored by: ValueWeb: > >Dedicated Hosting for just $79/mo with 500 GB of bandwidth! > >No other company gives more support or power for your dedicated = server > >http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ > >_______________________________________________ > >Dev-cpp-users mailing list > >Dev...@li... > >TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > _________________________________________________________________ > On the move? Get Hotmail on your mobile phone = http://www.msn.co.uk/mobile > ------------------------------------------------------- This SF.net email is sponsored by: ValueWeb:=20 Dedicated Hosting for just $79/mo with 500 GB of bandwidth!=20 No other company gives more support or power for your dedicated server http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: Vlada D. <dj...@im...> - 2003-04-04 16:14:32
|
----- Original Message ----- From: "Igor Pierscinski" <igo...@po...> To: <dev...@li...> Sent: Friday, April 04, 2003 4:31 PM Subject: RE: [Dev-C++] syntax error driving me crazy Hi, Please tell us what was the first syntax error on the list. Regards Igor Pierscinski The first error was: 21 C:\My Documents\Prog\interface\main.cpp syntax error before `.' in the line imgs[0].iBitmap=STD_FILENEW; and then same error occurs in every line. -----Original Message----- From: Vlada Djurovic [mailto:dj...@im...] Sent: Friday, April 04, 2003 2:46 PM To: Daniel Glenfield; dev...@li... Subject: Re: [Dev-C++] syntax error driving me crazy ----- Original Message ----- From: "Daniel Glenfield" <sp...@ho...> To: <dj...@im...>; <dev...@li...> Sent: Friday, April 04, 2003 2:25 PM Subject: Re: [Dev-C++] syntax error driving me crazy > > > > Have you defined imgs ? Does the compiler know what members are inside imgs? > I'm not sure what you mean. imgs is declared as array of TBBUTON structures, and if I'm right, TBBUTTON is defined in commctrl.h, which is included in my source file. The compiler didn't complain about TBBUTTON being undefined. I also linked comctl32 library. The code is the same as I found on MSDN, so I think it should work. > >From: "Vlada Djurovic" <dj...@im...> > >To: "'DevC++ help'" <dev...@li...> > >Subject: [Dev-C++] syntax error driving me crazy > >Date: Fri, 4 Apr 2003 13:27:37 +0200 > > > >Hi. > >Can somebody please tell me what is wrong with this peace of code? I get > >"syntax error before '.'" in every line and can't figure out what's wrong. > > > >TBBUTTON imgs[2]; > > > >imgs[0].iBitmap=STD_FILENEW; > >imgs[0].idCommand=ID_FILE_NEW; > >imgs[0].fsState=TBSTATE_ENABLED; > >imgs[0].fsStyle=BTNS_BUTTON; > >imgs[0].dwData=0; > >imgs[0].iString=0; > > > >imgs[1].iBitmap=STD_FILEOPEN; > >imgs[1].idCommand=ID_FILE_OPEN; > >imgs[1].fsState=TBSTATE_ENABLED; > >imgs[1].fsStyle=BTNS_BUTTON; > >imgs[1].dwData=0; > >imgs[1].iString=0; > > > >Thanks. > >------------ > >Vlada > > > > > > > >------------------------------------------------------- > >This SF.net email is sponsored by: ValueWeb: > >Dedicated Hosting for just $79/mo with 500 GB of bandwidth! > >No other company gives more support or power for your dedicated server > >http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ > >_______________________________________________ > >Dev-cpp-users mailing list > >Dev...@li... > >TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > _________________________________________________________________ > On the move? Get Hotmail on your mobile phone http://www.msn.co.uk/mobile > ------------------------------------------------------- This SF.net email is sponsored by: ValueWeb: Dedicated Hosting for just $79/mo with 500 GB of bandwidth! No other company gives more support or power for your dedicated server http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users ------------------------------------------------------- This SF.net email is sponsored by: ValueWeb: Dedicated Hosting for just $79/mo with 500 GB of bandwidth! No other company gives more support or power for your dedicated server http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: Igor P. <igo...@po...> - 2003-04-07 10:05:08
|
Hi, Check the line(s) immediately preceding the line showing syntax error. Check if ';' is not missing at the end of that line. You can also try to rename imgs to something else and see if the problem still exist. If it still does not work please send us 10 - 15 lines preceding the first line with syntax error. Best Regards Igor Pierscinski -----Original Message----- From: Vlada Djurovic [mailto:dj...@im...] Sent: Friday, April 04, 2003 6:12 PM To: Igor Pieroeci=F1ski; dev...@li... Subject: Re: [Dev-C++] syntax error driving me crazy ----- Original Message ----- From: "Igor Pierscinski" <igo...@po...> To: <dev...@li...> Sent: Friday, April 04, 2003 4:31 PM Subject: RE: [Dev-C++] syntax error driving me crazy Hi, Please tell us what was the first syntax error on the list. Regards Igor Pierscinski The first error was: 21 C:\My Documents\Prog\interface\main.cpp syntax error before `.' in the line imgs[0].iBitmap=3DSTD_FILENEW; and then same error occurs in every line. -----Original Message----- From: Vlada Djurovic [mailto:dj...@im...] Sent: Friday, April 04, 2003 2:46 PM To: Daniel Glenfield; dev...@li... Subject: Re: [Dev-C++] syntax error driving me crazy ----- Original Message ----- From: "Daniel Glenfield" <sp...@ho...> To: <dj...@im...>; <dev...@li...> Sent: Friday, April 04, 2003 2:25 PM Subject: Re: [Dev-C++] syntax error driving me crazy > > > > Have you defined imgs ? Does the compiler know what members are inside imgs? > I'm not sure what you mean. imgs is declared as array of TBBUTON = structures, and if I'm right, TBBUTTON is defined in commctrl.h, which is included = in my source file. The compiler didn't complain about TBBUTTON being = undefined. I also linked comctl32 library. The code is the same as I found on MSDN, = so I think it should work. > >From: "Vlada Djurovic" <dj...@im...> > >To: "'DevC++ help'" <dev...@li...> > >Subject: [Dev-C++] syntax error driving me crazy > >Date: Fri, 4 Apr 2003 13:27:37 +0200 > > > >Hi. > >Can somebody please tell me what is wrong with this peace of code? I = get > >"syntax error before '.'" in every line and can't figure out what's wrong. > > > >TBBUTTON imgs[2]; > > > >imgs[0].iBitmap=3DSTD_FILENEW; > >imgs[0].idCommand=3DID_FILE_NEW; > >imgs[0].fsState=3DTBSTATE_ENABLED; > >imgs[0].fsStyle=3DBTNS_BUTTON; > >imgs[0].dwData=3D0; > >imgs[0].iString=3D0; > > > >imgs[1].iBitmap=3DSTD_FILEOPEN; > >imgs[1].idCommand=3DID_FILE_OPEN; > >imgs[1].fsState=3DTBSTATE_ENABLED; > >imgs[1].fsStyle=3DBTNS_BUTTON; > >imgs[1].dwData=3D0; > >imgs[1].iString=3D0; > > > >Thanks. > >------------ > >Vlada > > > > > > > >------------------------------------------------------- > >This SF.net email is sponsored by: ValueWeb: > >Dedicated Hosting for just $79/mo with 500 GB of bandwidth! > >No other company gives more support or power for your dedicated = server > >http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ > >_______________________________________________ > >Dev-cpp-users mailing list > >Dev...@li... > >TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > _________________________________________________________________ > On the move? Get Hotmail on your mobile phone = http://www.msn.co.uk/mobile > ------------------------------------------------------- This SF.net email is sponsored by: ValueWeb: Dedicated Hosting for just $79/mo with 500 GB of bandwidth! No other company gives more support or power for your dedicated server http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users ------------------------------------------------------- This SF.net email is sponsored by: ValueWeb: Dedicated Hosting for just $79/mo with 500 GB of bandwidth! No other company gives more support or power for your dedicated server http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: Vlada D. <dj...@im...> - 2003-04-07 10:45:52
|
----- Original Message -----
From: "Igor Pierscinski" <igo...@po...>
To: <dev...@li...>
Sent: Monday, April 07, 2003 12:04 PM
Subject: RE: [Dev-C++] syntax error driving me crazy
Hi,
Check the line(s) immediately preceding the line showing
syntax error. Check if ';' is not missing at the end of that line.
You can also try to rename imgs to something else and
see if the problem still exist. If it still does not work please
send us 10 - 15 lines preceding the first line with syntax error.
Best Regards
Igor Pierscinski
I tried what you said, but still no luck. Here's the begining of the file.
Thanks for your time.
#define _WIN32_IE 0x0400
#include <windows.h>
#include <commctrl.h>
#include "resource.h"
/* Declare Windows procedure */
LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
/* Make the class name into a global variable */
char szClassName[ ] = "WindowsApp";
HINSTANCE g_hInst;
TBBUTTON image[2];
image[0].iBitmap=STD_FILENEW;
image[0].idCommand=ID_FILE_NEW;
image[0].fsState=TBSTATE_ENABLED;
image[0].fsStyle=BTNS_BUTTON;
image[0].dwData=0;
image[0].iString=0;
image[1].iBitmap=STD_FILEOPEN;
image[1].idCommand=ID_FILE_OPEN;
image[1].fsState=TBSTATE_ENABLED;
image[1].fsStyle=BTNS_BUTTON;
image[1].dwData=0;
image[1].iString=0;
int WINAPI
WinMain (HINSTANCE hThisInstance,
HINSTANCE hPrevInstance,
LPSTR lpszArgument,
int nFunsterStil)
file://rest of code
-----Original Message-----
From: Vlada Djurovic [mailto:dj...@im...]
Sent: Friday, April 04, 2003 6:12 PM
To: Igor Pieroeciñski; dev...@li...
Subject: Re: [Dev-C++] syntax error driving me crazy
----- Original Message -----
From: "Igor Pierscinski" <igo...@po...>
To: <dev...@li...>
Sent: Friday, April 04, 2003 4:31 PM
Subject: RE: [Dev-C++] syntax error driving me crazy
Hi,
Please tell us what was the first syntax error on the list.
Regards
Igor Pierscinski
The first error was:
21 C:\My Documents\Prog\interface\main.cpp
syntax error before `.'
in the line
imgs[0].iBitmap=STD_FILENEW;
and then same error occurs in every line.
-----Original Message-----
From: Vlada Djurovic [mailto:dj...@im...]
Sent: Friday, April 04, 2003 2:46 PM
To: Daniel Glenfield; dev...@li...
Subject: Re: [Dev-C++] syntax error driving me crazy
----- Original Message -----
From: "Daniel Glenfield" <sp...@ho...>
To: <dj...@im...>; <dev...@li...>
Sent: Friday, April 04, 2003 2:25 PM
Subject: Re: [Dev-C++] syntax error driving me crazy
>
>
>
> Have you defined imgs ? Does the compiler know what members are inside
imgs?
>
I'm not sure what you mean. imgs is declared as array of TBBUTON structures,
and if I'm right, TBBUTTON is defined in commctrl.h, which is included in my
source file. The compiler didn't complain about TBBUTTON being undefined. I
also linked comctl32 library. The code is the same as I found on MSDN, so I
think it should work.
> >From: "Vlada Djurovic" <dj...@im...>
> >To: "'DevC++ help'" <dev...@li...>
> >Subject: [Dev-C++] syntax error driving me crazy
> >Date: Fri, 4 Apr 2003 13:27:37 +0200
> >
> >Hi.
> >Can somebody please tell me what is wrong with this peace of code? I get
> >"syntax error before '.'" in every line and can't figure out what's
wrong.
> >
> >TBBUTTON imgs[2];
> >
> >imgs[0].iBitmap=STD_FILENEW;
> >imgs[0].idCommand=ID_FILE_NEW;
> >imgs[0].fsState=TBSTATE_ENABLED;
> >imgs[0].fsStyle=BTNS_BUTTON;
> >imgs[0].dwData=0;
> >imgs[0].iString=0;
> >
> >imgs[1].iBitmap=STD_FILEOPEN;
> >imgs[1].idCommand=ID_FILE_OPEN;
> >imgs[1].fsState=TBSTATE_ENABLED;
> >imgs[1].fsStyle=BTNS_BUTTON;
> >imgs[1].dwData=0;
> >imgs[1].iString=0;
> >
> >Thanks.
> >------------
> >Vlada
> >
> >
> >
> >-------------------------------------------------------
> >This SF.net email is sponsored by: ValueWeb:
> >Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
> >No other company gives more support or power for your dedicated server
> >http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> >_______________________________________________
> >Dev-cpp-users mailing list
> >Dev...@li...
> >TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
>
> _________________________________________________________________
> On the move? Get Hotmail on your mobile phone http://www.msn.co.uk/mobile
>
-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|
|
From: Per W. <pw...@ia...> - 2003-04-07 11:55:38
|
No code statements outside of a function!
/Per W
On Mon, 7 Apr 2003, Vlada Djurovic wrote:
>
> ----- Original Message -----
> From: "Igor Pierscinski" <igo...@po...>
> To: <dev...@li...>
> Sent: Monday, April 07, 2003 12:04 PM
> Subject: RE: [Dev-C++] syntax error driving me crazy
>
>
> Hi,
>
> Check the line(s) immediately preceding the line showing
> syntax error. Check if ';' is not missing at the end of that line.
> You can also try to rename imgs to something else and
> see if the problem still exist. If it still does not work please
> send us 10 - 15 lines preceding the first line with syntax error.
>
> Best Regards
>
> Igor Pierscinski
>
> I tried what you said, but still no luck. Here's the begining of the file=
=2E
> Thanks for your time.
>
> #define _WIN32_IE 0x0400
> #include <windows.h>
> #include <commctrl.h>
> #include "resource.h"
>
>
> /* Declare Windows procedure */
> LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
>
> /* Make the class name into a global variable */
> char szClassName[ ] =3D "WindowsApp";
> HINSTANCE g_hInst;
>
> TBBUTTON image[2];
>
>
void my_init_function() {
> image[0].iBitmap=3DSTD_FILENEW;
> image[0].idCommand=3DID_FILE_NEW;
> image[0].fsState=3DTBSTATE_ENABLED;
> image[0].fsStyle=3DBTNS_BUTTON;
> image[0].dwData=3D0;
> image[0].iString=3D0;
>
> image[1].iBitmap=3DSTD_FILEOPEN;
> image[1].idCommand=3DID_FILE_OPEN;
> image[1].fsState=3DTBSTATE_ENABLED;
> image[1].fsStyle=3DBTNS_BUTTON;
> image[1].dwData=3D0;
> image[1].iString=3D0;
}
>
>
> int WINAPI
> WinMain (HINSTANCE hThisInstance,
> HINSTANCE hPrevInstance,
> LPSTR lpszArgument,
> int nFunsterStil)
> file://rest of code
>
> -----Original Message-----
> From: Vlada Djurovic [mailto:dj...@im...]
> Sent: Friday, April 04, 2003 6:12 PM
> To: Igor Pieroeci=F1ski; dev...@li...
> Subject: Re: [Dev-C++] syntax error driving me crazy
>
>
>
> ----- Original Message -----
> From: "Igor Pierscinski" <igo...@po...>
> To: <dev...@li...>
> Sent: Friday, April 04, 2003 4:31 PM
> Subject: RE: [Dev-C++] syntax error driving me crazy
>
>
> Hi,
>
> Please tell us what was the first syntax error on the list.
>
> Regards
>
> Igor Pierscinski
>
>
> The first error was:
>
> 21 C:\My Documents\Prog\interface\main.cpp
> syntax error before `.'
> in the line
> imgs[0].iBitmap=3DSTD_FILENEW;
>
> and then same error occurs in every line.
>
> -----Original Message-----
> From: Vlada Djurovic [mailto:dj...@im...]
> Sent: Friday, April 04, 2003 2:46 PM
> To: Daniel Glenfield; dev...@li...
> Subject: Re: [Dev-C++] syntax error driving me crazy
>
>
>
> ----- Original Message -----
> From: "Daniel Glenfield" <sp...@ho...>
> To: <dj...@im...>; <dev...@li...>
> Sent: Friday, April 04, 2003 2:25 PM
> Subject: Re: [Dev-C++] syntax error driving me crazy
>
>
> >
> >
> >
> > Have you defined imgs ? Does the compiler know what members are inside
> imgs?
> >
>
> I'm not sure what you mean. imgs is declared as array of TBBUTON structur=
es,
> and if I'm right, TBBUTTON is defined in commctrl.h, which is included in=
my
> source file. The compiler didn't complain about TBBUTTON being undefined.=
I
> also linked comctl32 library. The code is the same as I found on MSDN, s=
o I
> think it should work.
>
>
> > >From: "Vlada Djurovic" <dj...@im...>
> > >To: "'DevC++ help'" <dev...@li...>
> > >Subject: [Dev-C++] syntax error driving me crazy
> > >Date: Fri, 4 Apr 2003 13:27:37 +0200
> > >
> > >Hi.
> > >Can somebody please tell me what is wrong with this peace of code? I g=
et
> > >"syntax error before '.'" in every line and can't figure out what's
> wrong.
> > >
> > >TBBUTTON imgs[2];
> > >
> > >imgs[0].iBitmap=3DSTD_FILENEW;
> > >imgs[0].idCommand=3DID_FILE_NEW;
> > >imgs[0].fsState=3DTBSTATE_ENABLED;
> > >imgs[0].fsStyle=3DBTNS_BUTTON;
> > >imgs[0].dwData=3D0;
> > >imgs[0].iString=3D0;
> > >
> > >imgs[1].iBitmap=3DSTD_FILEOPEN;
> > >imgs[1].idCommand=3DID_FILE_OPEN;
> > >imgs[1].fsState=3DTBSTATE_ENABLED;
> > >imgs[1].fsStyle=3DBTNS_BUTTON;
> > >imgs[1].dwData=3D0;
> > >imgs[1].iString=3D0;
> > >
> > >Thanks.
> > >------------
> > >Vlada
> > >
> > >
> > >
> > >-------------------------------------------------------
> > >This SF.net email is sponsored by: ValueWeb:
> > >Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
> > >No other company gives more support or power for your dedicated server
> > >http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> > >_______________________________________________
> > >Dev-cpp-users mailing list
> > >Dev...@li...
> > >TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> > >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
> >
> >
> > _________________________________________________________________
> > On the move? Get Hotmail on your mobile phone http://www.msn.co.uk/mobi=
le
> >
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: ValueWeb:
> Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
> No other company gives more support or power for your dedicated server
> http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: ValueWeb:
> Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
> No other company gives more support or power for your dedicated server
> http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: ValueWeb:
> Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
> No other company gives more support or power for your dedicated server
> http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: ValueWeb:
> Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
> No other company gives more support or power for your dedicated server
> http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|
|
From: Vlada D. <dj...@im...> - 2003-04-07 12:37:42
|
----- Original Message -----
From: "Per Westermark" <pw...@ia...>
To: "Vlada Djurovic" <dj...@im...>
Cc: "Igor Pierscinski" <igo...@po...>;
<dev...@li...>
Sent: Monday, April 07, 2003 2:53 PM
Subject: Re: [Dev-C++] syntax error driving me crazy
>No code statements outside of a function!
>
>/Per W
That's it!!! Thanks! But I'm not sure I understand why is this a mistake?
Isn't it just a case of assigning values to global variables? Can you
explain? (Sorry if I'm bugging you, but...)
On Mon, 7 Apr 2003, Vlada Djurovic wrote:
>
> ----- Original Message -----
> From: "Igor Pierscinski" <igo...@po...>
> To: <dev...@li...>
> Sent: Monday, April 07, 2003 12:04 PM
> Subject: RE: [Dev-C++] syntax error driving me crazy
>
>
> Hi,
>
> Check the line(s) immediately preceding the line showing
> syntax error. Check if ';' is not missing at the end of that line.
> You can also try to rename imgs to something else and
> see if the problem still exist. If it still does not work please
> send us 10 - 15 lines preceding the first line with syntax error.
>
> Best Regards
>
> Igor Pierscinski
>
> I tried what you said, but still no luck. Here's the begining of the file.
> Thanks for your time.
>
> #define _WIN32_IE 0x0400
> #include <windows.h>
> #include <commctrl.h>
> #include "resource.h"
>
>
> /* Declare Windows procedure */
> LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
>
> /* Make the class name into a global variable */
> char szClassName[ ] = "WindowsApp";
> HINSTANCE g_hInst;
>
> TBBUTTON image[2];
>
>
void my_init_function() {
> image[0].iBitmap=STD_FILENEW;
> image[0].idCommand=ID_FILE_NEW;
> image[0].fsState=TBSTATE_ENABLED;
> image[0].fsStyle=BTNS_BUTTON;
> image[0].dwData=0;
> image[0].iString=0;
>
> image[1].iBitmap=STD_FILEOPEN;
> image[1].idCommand=ID_FILE_OPEN;
> image[1].fsState=TBSTATE_ENABLED;
> image[1].fsStyle=BTNS_BUTTON;
> image[1].dwData=0;
> image[1].iString=0;
}
>
>
> int WINAPI
> WinMain (HINSTANCE hThisInstance,
> HINSTANCE hPrevInstance,
> LPSTR lpszArgument,
> int nFunsterStil)
> file://rest of code
>
> -----Original Message-----
> From: Vlada Djurovic [mailto:dj...@im...]
> Sent: Friday, April 04, 2003 6:12 PM
> To: Igor Pieroeciñski; dev...@li...
> Subject: Re: [Dev-C++] syntax error driving me crazy
>
>
>
> ----- Original Message -----
> From: "Igor Pierscinski" <igo...@po...>
> To: <dev...@li...>
> Sent: Friday, April 04, 2003 4:31 PM
> Subject: RE: [Dev-C++] syntax error driving me crazy
>
>
> Hi,
>
> Please tell us what was the first syntax error on the list.
>
> Regards
>
> Igor Pierscinski
>
>
> The first error was:
>
> 21 C:\My Documents\Prog\interface\main.cpp
> syntax error before `.'
> in the line
> imgs[0].iBitmap=STD_FILENEW;
>
> and then same error occurs in every line.
>
> -----Original Message-----
> From: Vlada Djurovic [mailto:dj...@im...]
> Sent: Friday, April 04, 2003 2:46 PM
> To: Daniel Glenfield; dev...@li...
> Subject: Re: [Dev-C++] syntax error driving me crazy
>
>
>
> ----- Original Message -----
> From: "Daniel Glenfield" <sp...@ho...>
> To: <dj...@im...>; <dev...@li...>
> Sent: Friday, April 04, 2003 2:25 PM
> Subject: Re: [Dev-C++] syntax error driving me crazy
>
>
> >
> >
> >
> > Have you defined imgs ? Does the compiler know what members are inside
> imgs?
> >
>
> I'm not sure what you mean. imgs is declared as array of TBBUTON
structures,
> and if I'm right, TBBUTTON is defined in commctrl.h, which is included in
my
> source file. The compiler didn't complain about TBBUTTON being undefined.
I
> also linked comctl32 library. The code is the same as I found on MSDN, so
I
> think it should work.
>
>
> > >From: "Vlada Djurovic" <dj...@im...>
> > >To: "'DevC++ help'" <dev...@li...>
> > >Subject: [Dev-C++] syntax error driving me crazy
> > >Date: Fri, 4 Apr 2003 13:27:37 +0200
> > >
> > >Hi.
> > >Can somebody please tell me what is wrong with this peace of code? I
get
> > >"syntax error before '.'" in every line and can't figure out what's
> wrong.
> > >
> > >TBBUTTON imgs[2];
> > >
> > >imgs[0].iBitmap=STD_FILENEW;
> > >imgs[0].idCommand=ID_FILE_NEW;
> > >imgs[0].fsState=TBSTATE_ENABLED;
> > >imgs[0].fsStyle=BTNS_BUTTON;
> > >imgs[0].dwData=0;
> > >imgs[0].iString=0;
> > >
> > >imgs[1].iBitmap=STD_FILEOPEN;
> > >imgs[1].idCommand=ID_FILE_OPEN;
> > >imgs[1].fsState=TBSTATE_ENABLED;
> > >imgs[1].fsStyle=BTNS_BUTTON;
> > >imgs[1].dwData=0;
> > >imgs[1].iString=0;
> > >
> > >Thanks.
> > >------------
> > >Vlada
> > >
> > >
> > >
> > >-------------------------------------------------------
> > >This SF.net email is sponsored by: ValueWeb:
> > >Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
> > >No other company gives more support or power for your dedicated server
> > >http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> > >_______________________________________________
> > >Dev-cpp-users mailing list
> > >Dev...@li...
> > >TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> > >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
> >
> >
> > _________________________________________________________________
> > On the move? Get Hotmail on your mobile phone
http://www.msn.co.uk/mobile
> >
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: ValueWeb:
> Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
> No other company gives more support or power for your dedicated server
> http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: ValueWeb:
> Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
> No other company gives more support or power for your dedicated server
> http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: ValueWeb:
> Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
> No other company gives more support or power for your dedicated server
> http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: ValueWeb:
> Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
> No other company gives more support or power for your dedicated server
> http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|
|
From: Per W. <pw...@ia...> - 2003-04-07 14:36:11
|
You might write:
stuct x {
int a,b,c;
};
x myvar[2] =3D {{1,2,3},{3,4,5}};
However, you may not write:
x myvar;
myvar[0].x =3D 1;
myvar[0].y =3D 2;
=2E..
When assigning values to a global variable, the assign must be of the form
my_type my_global_variable =3D xx;
or
my_type my_global_variable =3D { xx };
If you don't give an equal sign directly, the global variable will be set
to zero, and you'll have to wait until you are inside main() or a function
called by main() before you may change the value of the global variable.
/Per W
On Mon, 7 Apr 2003, Vlada Djurovic wrote:
>
> ----- Original Message -----
> From: "Per Westermark" <pw...@ia...>
> To: "Vlada Djurovic" <dj...@im...>
> Cc: "Igor Pierscinski" <igo...@po...>;
> <dev...@li...>
> Sent: Monday, April 07, 2003 2:53 PM
> Subject: Re: [Dev-C++] syntax error driving me crazy
>
>
> >No code statements outside of a function!
> >
> >/Per W
>
> That's it!!! Thanks! But I'm not sure I understand why is this a mistake?
> Isn't it just a case of assigning values to global variables? Can you
> explain? (Sorry if I'm bugging you, but...)
>
> On Mon, 7 Apr 2003, Vlada Djurovic wrote:
>
> >
> > ----- Original Message -----
> > From: "Igor Pierscinski" <igo...@po...>
> > To: <dev...@li...>
> > Sent: Monday, April 07, 2003 12:04 PM
> > Subject: RE: [Dev-C++] syntax error driving me crazy
> >
> >
> > Hi,
> >
> > Check the line(s) immediately preceding the line showing
> > syntax error. Check if ';' is not missing at the end of that line.
> > You can also try to rename imgs to something else and
> > see if the problem still exist. If it still does not work please
> > send us 10 - 15 lines preceding the first line with syntax error.
> >
> > Best Regards
> >
> > Igor Pierscinski
> >
> > I tried what you said, but still no luck. Here's the begining of the fi=
le.
> > Thanks for your time.
> >
> > #define _WIN32_IE 0x0400
> > #include <windows.h>
> > #include <commctrl.h>
> > #include "resource.h"
> >
> >
> > /* Declare Windows procedure */
> > LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
> >
> > /* Make the class name into a global variable */
> > char szClassName[ ] =3D "WindowsApp";
> > HINSTANCE g_hInst;
> >
> > TBBUTTON image[2];
> >
> >
> void my_init_function() {
> > image[0].iBitmap=3DSTD_FILENEW;
> > image[0].idCommand=3DID_FILE_NEW;
> > image[0].fsState=3DTBSTATE_ENABLED;
> > image[0].fsStyle=3DBTNS_BUTTON;
> > image[0].dwData=3D0;
> > image[0].iString=3D0;
> >
> > image[1].iBitmap=3DSTD_FILEOPEN;
> > image[1].idCommand=3DID_FILE_OPEN;
> > image[1].fsState=3DTBSTATE_ENABLED;
> > image[1].fsStyle=3DBTNS_BUTTON;
> > image[1].dwData=3D0;
> > image[1].iString=3D0;
> }
> >
> >
> > int WINAPI
> > WinMain (HINSTANCE hThisInstance,
> > HINSTANCE hPrevInstance,
> > LPSTR lpszArgument,
> > int nFunsterStil)
> > file://rest of code
> >
> > -----Original Message-----
> > From: Vlada Djurovic [mailto:dj...@im...]
> > Sent: Friday, April 04, 2003 6:12 PM
> > To: Igor Pieroeci=F1ski; dev...@li...
> > Subject: Re: [Dev-C++] syntax error driving me crazy
> >
> >
> >
> > ----- Original Message -----
> > From: "Igor Pierscinski" <igo...@po...>
> > To: <dev...@li...>
> > Sent: Friday, April 04, 2003 4:31 PM
> > Subject: RE: [Dev-C++] syntax error driving me crazy
> >
> >
> > Hi,
> >
> > Please tell us what was the first syntax error on the list.
> >
> > Regards
> >
> > Igor Pierscinski
> >
> >
> > The first error was:
> >
> > 21 C:\My Documents\Prog\interface\main.cpp
> > syntax error before `.'
> > in the line
> > imgs[0].iBitmap=3DSTD_FILENEW;
> >
> > and then same error occurs in every line.
> >
> > -----Original Message-----
> > From: Vlada Djurovic [mailto:dj...@im...]
> > Sent: Friday, April 04, 2003 2:46 PM
> > To: Daniel Glenfield; dev...@li...
> > Subject: Re: [Dev-C++] syntax error driving me crazy
> >
> >
> >
> > ----- Original Message -----
> > From: "Daniel Glenfield" <sp...@ho...>
> > To: <dj...@im...>; <dev...@li...>
> > Sent: Friday, April 04, 2003 2:25 PM
> > Subject: Re: [Dev-C++] syntax error driving me crazy
> >
> >
> > >
> > >
> > >
> > > Have you defined imgs ? Does the compiler know what members are insid=
e
> > imgs?
> > >
> >
> > I'm not sure what you mean. imgs is declared as array of TBBUTON
> structures,
> > and if I'm right, TBBUTTON is defined in commctrl.h, which is included =
in
> my
> > source file. The compiler didn't complain about TBBUTTON being undefine=
d.
> I
> > also linked comctl32 library. The code is the same as I found on MSDN,=
so
> I
> > think it should work.
> >
> >
> > > >From: "Vlada Djurovic" <dj...@im...>
> > > >To: "'DevC++ help'" <dev...@li...>
> > > >Subject: [Dev-C++] syntax error driving me crazy
> > > >Date: Fri, 4 Apr 2003 13:27:37 +0200
> > > >
> > > >Hi.
> > > >Can somebody please tell me what is wrong with this peace of code? I
> get
> > > >"syntax error before '.'" in every line and can't figure out what's
> > wrong.
> > > >
> > > >TBBUTTON imgs[2];
> > > >
> > > >imgs[0].iBitmap=3DSTD_FILENEW;
> > > >imgs[0].idCommand=3DID_FILE_NEW;
> > > >imgs[0].fsState=3DTBSTATE_ENABLED;
> > > >imgs[0].fsStyle=3DBTNS_BUTTON;
> > > >imgs[0].dwData=3D0;
> > > >imgs[0].iString=3D0;
> > > >
> > > >imgs[1].iBitmap=3DSTD_FILEOPEN;
> > > >imgs[1].idCommand=3DID_FILE_OPEN;
> > > >imgs[1].fsState=3DTBSTATE_ENABLED;
> > > >imgs[1].fsStyle=3DBTNS_BUTTON;
> > > >imgs[1].dwData=3D0;
> > > >imgs[1].iString=3D0;
> > > >
> > > >Thanks.
> > > >------------
> > > >Vlada
> > > >
> > > >
> > > >
> > > >-------------------------------------------------------
> > > >This SF.net email is sponsored by: ValueWeb:
> > > >Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
> > > >No other company gives more support or power for your dedicated serv=
er
> > > >http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> > > >_______________________________________________
> > > >Dev-cpp-users mailing list
> > > >Dev...@li...
> > > >TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> > > >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
> > >
> > >
> > > _________________________________________________________________
> > > On the move? Get Hotmail on your mobile phone
> http://www.msn.co.uk/mobile
> > >
> >
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: ValueWeb:
> > Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
> > No other company gives more support or power for your dedicated server
> > http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> > _______________________________________________
> > Dev-cpp-users mailing list
> > Dev...@li...
> > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: ValueWeb:
> > Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
> > No other company gives more support or power for your dedicated server
> > http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> > _______________________________________________
> > Dev-cpp-users mailing list
> > Dev...@li...
> > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
> >
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: ValueWeb:
> > Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
> > No other company gives more support or power for your dedicated server
> > http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> > _______________________________________________
> > Dev-cpp-users mailing list
> > Dev...@li...
> > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
> >
> >
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: ValueWeb:
> > Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
> > No other company gives more support or power for your dedicated server
> > http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> > _______________________________________________
> > Dev-cpp-users mailing list
> > Dev...@li...
> > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
> >
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: ValueWeb:
> Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
> No other company gives more support or power for your dedicated server
> http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|
|
From: Vlada D. <dj...@im...> - 2003-04-08 06:22:59
|
Thanks for explanation. I think it will be very usefull.
----- Original Message -----
From: "Per Westermark" <pw...@ia...>
To: "Vlada Djurovic" <dj...@im...>
Cc: "Igor Pierscinski" <igo...@po...>;
<dev...@li...>
Sent: Monday, April 07, 2003 5:34 PM
Subject: Re: [Dev-C++] syntax error driving me crazy
You might write:
stuct x {
int a,b,c;
};
x myvar[2] = {{1,2,3},{3,4,5}};
However, you may not write:
x myvar;
myvar[0].x = 1;
myvar[0].y = 2;
...
When assigning values to a global variable, the assign must be of the form
my_type my_global_variable = xx;
or
my_type my_global_variable = { xx };
If you don't give an equal sign directly, the global variable will be set
to zero, and you'll have to wait until you are inside main() or a function
called by main() before you may change the value of the global variable.
/Per W
On Mon, 7 Apr 2003, Vlada Djurovic wrote:
>
> ----- Original Message -----
> From: "Per Westermark" <pw...@ia...>
> To: "Vlada Djurovic" <dj...@im...>
> Cc: "Igor Pierscinski" <igo...@po...>;
> <dev...@li...>
> Sent: Monday, April 07, 2003 2:53 PM
> Subject: Re: [Dev-C++] syntax error driving me crazy
>
>
> >No code statements outside of a function!
> >
> >/Per W
>
> That's it!!! Thanks! But I'm not sure I understand why is this a mistake?
> Isn't it just a case of assigning values to global variables? Can you
> explain? (Sorry if I'm bugging you, but...)
>
> On Mon, 7 Apr 2003, Vlada Djurovic wrote:
>
> >
> > ----- Original Message -----
> > From: "Igor Pierscinski" <igo...@po...>
> > To: <dev...@li...>
> > Sent: Monday, April 07, 2003 12:04 PM
> > Subject: RE: [Dev-C++] syntax error driving me crazy
> >
> >
> > Hi,
> >
> > Check the line(s) immediately preceding the line showing
> > syntax error. Check if ';' is not missing at the end of that line.
> > You can also try to rename imgs to something else and
> > see if the problem still exist. If it still does not work please
> > send us 10 - 15 lines preceding the first line with syntax error.
> >
> > Best Regards
> >
> > Igor Pierscinski
> >
> > I tried what you said, but still no luck. Here's the begining of the
file.
> > Thanks for your time.
> >
> > #define _WIN32_IE 0x0400
> > #include <windows.h>
> > #include <commctrl.h>
> > #include "resource.h"
> >
> >
> > /* Declare Windows procedure */
> > LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
> >
> > /* Make the class name into a global variable */
> > char szClassName[ ] = "WindowsApp";
> > HINSTANCE g_hInst;
> >
> > TBBUTTON image[2];
> >
> >
> void my_init_function() {
> > image[0].iBitmap=STD_FILENEW;
> > image[0].idCommand=ID_FILE_NEW;
> > image[0].fsState=TBSTATE_ENABLED;
> > image[0].fsStyle=BTNS_BUTTON;
> > image[0].dwData=0;
> > image[0].iString=0;
> >
> > image[1].iBitmap=STD_FILEOPEN;
> > image[1].idCommand=ID_FILE_OPEN;
> > image[1].fsState=TBSTATE_ENABLED;
> > image[1].fsStyle=BTNS_BUTTON;
> > image[1].dwData=0;
> > image[1].iString=0;
> }
> >
> >
> > int WINAPI
> > WinMain (HINSTANCE hThisInstance,
> > HINSTANCE hPrevInstance,
> > LPSTR lpszArgument,
> > int nFunsterStil)
> > file://rest of code
> >
> > -----Original Message-----
> > From: Vlada Djurovic [mailto:dj...@im...]
> > Sent: Friday, April 04, 2003 6:12 PM
> > To: Igor Pieroeciñski; dev...@li...
> > Subject: Re: [Dev-C++] syntax error driving me crazy
> >
> >
> >
> > ----- Original Message -----
> > From: "Igor Pierscinski" <igo...@po...>
> > To: <dev...@li...>
> > Sent: Friday, April 04, 2003 4:31 PM
> > Subject: RE: [Dev-C++] syntax error driving me crazy
> >
> >
> > Hi,
> >
> > Please tell us what was the first syntax error on the list.
> >
> > Regards
> >
> > Igor Pierscinski
> >
> >
> > The first error was:
> >
> > 21 C:\My Documents\Prog\interface\main.cpp
> > syntax error before `.'
> > in the line
> > imgs[0].iBitmap=STD_FILENEW;
> >
> > and then same error occurs in every line.
> >
> > -----Original Message-----
> > From: Vlada Djurovic [mailto:dj...@im...]
> > Sent: Friday, April 04, 2003 2:46 PM
> > To: Daniel Glenfield; dev...@li...
> > Subject: Re: [Dev-C++] syntax error driving me crazy
> >
> >
> >
> > ----- Original Message -----
> > From: "Daniel Glenfield" <sp...@ho...>
> > To: <dj...@im...>; <dev...@li...>
> > Sent: Friday, April 04, 2003 2:25 PM
> > Subject: Re: [Dev-C++] syntax error driving me crazy
> >
> >
> > >
> > >
> > >
> > > Have you defined imgs ? Does the compiler know what members are inside
> > imgs?
> > >
> >
> > I'm not sure what you mean. imgs is declared as array of TBBUTON
> structures,
> > and if I'm right, TBBUTTON is defined in commctrl.h, which is included
in
> my
> > source file. The compiler didn't complain about TBBUTTON being
undefined.
> I
> > also linked comctl32 library. The code is the same as I found on MSDN,
so
> I
> > think it should work.
> >
> >
> > > >From: "Vlada Djurovic" <dj...@im...>
> > > >To: "'DevC++ help'" <dev...@li...>
> > > >Subject: [Dev-C++] syntax error driving me crazy
> > > >Date: Fri, 4 Apr 2003 13:27:37 +0200
> > > >
> > > >Hi.
> > > >Can somebody please tell me what is wrong with this peace of code? I
> get
> > > >"syntax error before '.'" in every line and can't figure out what's
> > wrong.
> > > >
> > > >TBBUTTON imgs[2];
> > > >
> > > >imgs[0].iBitmap=STD_FILENEW;
> > > >imgs[0].idCommand=ID_FILE_NEW;
> > > >imgs[0].fsState=TBSTATE_ENABLED;
> > > >imgs[0].fsStyle=BTNS_BUTTON;
> > > >imgs[0].dwData=0;
> > > >imgs[0].iString=0;
> > > >
> > > >imgs[1].iBitmap=STD_FILEOPEN;
> > > >imgs[1].idCommand=ID_FILE_OPEN;
> > > >imgs[1].fsState=TBSTATE_ENABLED;
> > > >imgs[1].fsStyle=BTNS_BUTTON;
> > > >imgs[1].dwData=0;
> > > >imgs[1].iString=0;
> > > >
> > > >Thanks.
> > > >------------
> > > >Vlada
> > > >
> > > >
> > > >
> > > >-------------------------------------------------------
> > > >This SF.net email is sponsored by: ValueWeb:
> > > >Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
> > > >No other company gives more support or power for your dedicated
server
> > > >http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> > > >_______________________________________________
> > > >Dev-cpp-users mailing list
> > > >Dev...@li...
> > > >TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> > > >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
> > >
> > >
> > > _________________________________________________________________
> > > On the move? Get Hotmail on your mobile phone
> http://www.msn.co.uk/mobile
> > >
> >
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: ValueWeb:
> > Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
> > No other company gives more support or power for your dedicated server
> > http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> > _______________________________________________
> > Dev-cpp-users mailing list
> > Dev...@li...
> > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: ValueWeb:
> > Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
> > No other company gives more support or power for your dedicated server
> > http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> > _______________________________________________
> > Dev-cpp-users mailing list
> > Dev...@li...
> > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
> >
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: ValueWeb:
> > Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
> > No other company gives more support or power for your dedicated server
> > http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> > _______________________________________________
> > Dev-cpp-users mailing list
> > Dev...@li...
> > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
> >
> >
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: ValueWeb:
> > Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
> > No other company gives more support or power for your dedicated server
> > http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> > _______________________________________________
> > Dev-cpp-users mailing list
> > Dev...@li...
> > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
> >
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: ValueWeb:
> Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
> No other company gives more support or power for your dedicated server
> http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|
|
From: Vlada D. <dj...@im...> - 2003-04-04 12:47:47
|
----- Original Message ----- From: "Daniel Glenfield" <sp...@ho...> To: <dj...@im...>; <dev...@li...> Sent: Friday, April 04, 2003 2:25 PM Subject: Re: [Dev-C++] syntax error driving me crazy > > > > Have you defined imgs ? Does the compiler know what members are inside imgs? > I'm not sure what you mean. imgs is declared as array of TBBUTON structures, and if I'm right, TBBUTTON is defined in commctrl.h, which is included in my source file. The compiler didn't complain about TBBUTTON being undefined. I also linked comctl32 library. The code is the same as I found on MSDN, so I think it should work. > >From: "Vlada Djurovic" <dj...@im...> > >To: "'DevC++ help'" <dev...@li...> > >Subject: [Dev-C++] syntax error driving me crazy > >Date: Fri, 4 Apr 2003 13:27:37 +0200 > > > >Hi. > >Can somebody please tell me what is wrong with this peace of code? I get > >"syntax error before '.'" in every line and can't figure out what's wrong. > > > >TBBUTTON imgs[2]; > > > >imgs[0].iBitmap=STD_FILENEW; > >imgs[0].idCommand=ID_FILE_NEW; > >imgs[0].fsState=TBSTATE_ENABLED; > >imgs[0].fsStyle=BTNS_BUTTON; > >imgs[0].dwData=0; > >imgs[0].iString=0; > > > >imgs[1].iBitmap=STD_FILEOPEN; > >imgs[1].idCommand=ID_FILE_OPEN; > >imgs[1].fsState=TBSTATE_ENABLED; > >imgs[1].fsStyle=BTNS_BUTTON; > >imgs[1].dwData=0; > >imgs[1].iString=0; > > > >Thanks. > >------------ > >Vlada > > > > > > > >------------------------------------------------------- > >This SF.net email is sponsored by: ValueWeb: > >Dedicated Hosting for just $79/mo with 500 GB of bandwidth! > >No other company gives more support or power for your dedicated server > >http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ > >_______________________________________________ > >Dev-cpp-users mailing list > >Dev...@li... > >TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > _________________________________________________________________ > On the move? Get Hotmail on your mobile phone http://www.msn.co.uk/mobile > |