|
i am a beginner in programming,and i am learning c++;
today i find the following lines ,i dont know the syntax like this :
static _Interface* GetInterfacePtr() throw()
{
return NULL;
}
anybody waste some time to help me?
thanks in advance
|
|
|
|
|
|
i dont understand the " throw() ",does it break the definition of the function GetInterfacePtr()?
thanks
|
|
|
|
|
|
then if it is "throw (type)" ,what is the meaning ?
would you please tell me where i can find the explanation of the syntax ?
thanks
|
|
|
|
|
It would mean that the function may throw only exceptions of class "type". Look up "exception specification" in some proper C++ reference. Exception specifications aren't supported by VC++6.
|
|
|
|
|
markkuk wrote:
Exception specifications aren't supported by VC++6.
You sure about that? The first hit in MSDN when searching for "exception specification" shows examples of VC code using exception specifications.
--Mike--
My really out-of-date homepage
Buffy's on. Gotta go, bye!
Sonork - 100.10414 AcidHelm
Big fan of Alyson Hannigan.
|
|
|
|
|
Michael may be this gauy is confused for the following:
Microsoft Specific —>
Microsoft C++ does not support the function exception specification mechanism, as described in section 15.4 of the ANSI C++ draft.
I found that in the MSDN under Exception Handling Syntax It's a little confuss butc don't said that VC doesn't support Exception specifications...
Reagards...
Today is Friday!!! and Party!!!
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
If you declare something like:
void SampleFunction(void) throw (int)
{
}
and compile, you will get
warning C4290: C++ Exception Specification ignored
I vote pro drink
|
|
|
|
|
I am not sure a raw beginner should be directly jumping into COM. Anyway good luck!
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
I have huge files (<100Mb ) and want to map a number of the to mem. First up How do I determine where to start to map in memory? I am using NT so how do I know how much it is using.
And if you can help , how would you go about mapping large files in the first place?
Thanks
|
|
|
|
|
The functions will tell you exactly where the mapping starts.
Use CreateFileMapping() to create a mapping to file and MapViewOfFile() to load a portion (or all file) into memory. The last function will return you LPBYTE , points to the start of mapping
Look for descriptions of the functions in MSDN.
Philip Patrick
"Two beer or not two beer?" <shakesbeer>
Web-site: www.saintopatrick.com
|
|
|
|
|
Anyone know of a good class to enumerate all of the files in a directory with a given extension?
Ex: all files in c:\temp with extension .xyz
Marcus Spitzmiller
"Ha ha, Stupid bloropope.." - Homer
|
|
|
|
|
CFileFind.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Thanks, too! You just beat my post.
Marcus Spitzmiller
"Ha ha, Stupid bloropope.." - Homer
|
|
|
|
|
CPians are really fast at answering questions
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
Looks like I should've looked around a bit longer:
CFileFind
Marcus Spitzmiller
"Ha ha, Stupid bloropope.." - Homer
|
|
|
|
|
Hi all,
I would like to know if VC++ 7.0, that's what I heard is the next version, if it is a seperate commercial release or if it is part of MS .NET studio?
Thanks,
Don Cathcart
|
|
|
|
|
VC++ 7.0 is part of Visual Studio .NET
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
Thanks, that was fast?
Is there a Standard, Pro and Enterprise versions of Visual Studio .NET?
|
|
|
|
|
I guess there would be at least two editions, perhaps even more.
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
MasterBlaster?
Here that's what we call Sachin Tendulkar .
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
Nish [BusterBoy] wrote:
MasterBlaster?
Here that's what we call Sachin Tendulkar .
Really, in England we call him "oh no, not him again. Let's just put 150 runs on the board. It saves time and effort"
Michael
|
|
|
|
|
I thought STL was a bit more optimized than this. While I would expect and simple array to be faster I was surprised at the amount of difference. Using the two functions below I got the following timing results.
FooList: 0.0013247494 seconds
FooArray: 0.0000005587 seconds
std::list<DWORD> FooList()
{
std::list<DWORD> list;
for(int x = 0; x < 50; x++)
list.push_back(x);
return list;
}
void FooArray(DWORD* list)
{
for(int x = 0; x < 50; x++)
list[x] = x;
}
|
|
|
|
|
It depends - what STL implimentation are you using ? I admit I've never done this sort of testing, but while I'd expect some overhead, I assume you're using the version that comes with VC for results as poor as this.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|