|
BTW which version of VS/.NET framework do you use. AFAIK this function is available in VS2005/.NET framework (2.0) and above
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
_AnShUmAn_ wrote: BTW which version of VS/.NET framework do you use. AFAIK this function is available in VS2005/.NET framework (2.0) and above
.NET framework has nothing to do with this issue.
|
|
|
|
|
I have encountered the same problem like yours and the IDE is visual C++ 6.0 , the system is sp3
|
|
|
|
|
Are you sure it's not something simple like:
#define _countof(arr) (sizeof(arr)/sizeof(arr[0]))
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Sorry for not telling clearly what platform I'm using!
I use VC6.0 and xp sp2,
I don't know why _countof undeclared. I substitude the code '_countof' using (sizeof(arr)/sizeof(arr[0])).
But I still want to know why _countof not working?
|
|
|
|
|
fantasy1215 wrote: ...not working?
Which means what exactly?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
_countof not working.
In all the places using _countof, I substitute as sizeof(arr)/sizeof(arr[0]).
sizeof(arr)/sizeof(arr[0]) of course works.^_^
|
|
|
|
|
fantasy1215 wrote: _countof not working.
Are you going to show how you are using it?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
DavidCrow wrote: Are you going to show how you are using it?
What happened to your telescope and CPMRU?
|
|
|
|
|
TCHAR szstrFileBuf[MAX_PATH + 1024] = {0};
TCHAR szstrFileNameBuf[280] = {0};
OPENFILENAME openfn;
::ZeroMemory(&openfn, sizeof(openfn));
openfn.lStructSize = sizeof(openfn);
openfn.hwndOwner = this->GetSafeHwnd();
openfn.lpstrFilter = _T("win files(*.win)\0*.win\0all files\0*.*\0\0");
openfn.nFilterIndex = 1;
openfn.lpstrFile = szstrFileBuf;
openfn.nMaxFile = _countof(szstrFileBuf); //undeclared identify
//openfn.nMaxFile = sizeof(szstrFileBuf) / sizeof(szstrFileBuf[0]); //instead i use this
openfn.lpstrFileTitle = szstrFileNameBuf;
openfn.nMaxFileTitle = 270;
|
|
|
|
|
fantasy1215 wrote: openfn.nMaxFile = _countof(szstrFileBuf); //undeclared identify
Did you define it like I suggested?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
dear all
my question is after i debug, pc showed me: one or more breakpoints can't be set and have been disabled.execution will be stopped at the beginning of the program. how can i solve this problem. thanks a lot.
gentleguy
|
|
|
|
|
Either you're trying to debug the release build of your project or your browsing information is outdated.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
thanks, i used release already.do you have another idea, thanks a lot
gentleguy
|
|
|
|
|
Well, standard settings for the release build prevent the user of breakpoints.
Why don't you use breakpoints with the debug build of your project?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
i set one breakpoint already.
gentleguy
|
|
|
|
|
You were suggested to "use debug build" and you're replying that you have set a breakpoint.
|
|
|
|
|
Thanks for pointing out.
Would you like to become my attorney?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Yes, I've already set a breakpoint.
|
|
|
|
|
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
again thread hijack
Regards,
Sandip.
|
|
|
|
|
Shhhhhhhhhhh!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
it's seem there lot of Hijacker around!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/xml>
|
|
|
|
|
When!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/xml>
|
|
|
|