|
But it Working in TURBO C++ Compiler
A Programmer Never Dies..***
|
|
|
|
|
Turbo C++ creates DOS executables, and you surely know that there's no memory protection under DOS.
Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
|
|
|
|
|
s points to a constant string, you can§t change it.
Pavel
Sonork 100.15206
|
|
|
|
|
i already get the solution..but i want the reason behind it...is it in the code segment/data segment...why this consider as read only and how...what happend to when we cahnge that stsmnt in to []..??
pls explain.....
A Programmer Never Dies..!!!
|
|
|
|
|
Because inherently, the "..." is a literal, and is placed in a const segment. This *should* be a safe thing to do, and the segment then can be read-only. This allows the compiler/optimiser to use string pooling (multiple occurrences of the same literal can be folded into one). The address (char*) is the variable part, and is in the r/w segment.
The [] version simply declares and initialises some of the r/w segment, and is different.
Steve S
[This signature space available for rent]
|
|
|
|
|
The string is in code segment.
Pavel
Sonork 100.15206
|
|
|
|
|
But it Working in TURBO C++ Compiler
A Programmer Never Dies..***
|
|
|
|
|
DOS version of Turbo C++? The code segment is read-only on Windows.
Pavel
Sonork 100.15206
|
|
|
|
|
Howdy,
Does anyone know of a macro or whatever which lets you display line numbers in the VC6 Editor? I am having no luck so far...
Cheers
James
|
|
|
|
|
Try this dude..... but it's for C under Linux...might work here too.
#define TRACE printf ("%filename, %linenumber\n", _ _FILE_ _,_ _LINE_ _)
be careful with the "_"
and call TRACE anywhere you want. IE: TRACE; that's all
Good luck to ya.
Jey
|
|
|
|
|
Hi,
I'd be oblidged if someone can give me the code (using VC++) to accessing a particular port at a specified IP address.
The code should detect for failure(-1) or success.
Many Thanks,
John
|
|
|
|
|
Looking through a log file from Dr Watson (drwtsn32.exe) i found the following line
'------------ Stack Trace ---------*
FramePtr ReturnAd Param#1 Param#2 Param#3 Param#4 Funktionsnavn
01712610 00000665 6C3A1C58 01711320 00000001 6C3A1C58 !DLdbAPI::`default constructor closure'
Now I am wondering what 'default constructor closure' means ... can anyone help (the program that creates the dump/crash is in visual c++
Something clever
|
|
|
|
|
I *guess* this may be the default constructor generated by C++ compiler. Do you have the source for DLdbAPI class?
Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
|
|
|
|
|
Yes I do have the source, but it doesn't really give any hints as to what this could mean. But I suspect that you're probably right, it probably has something to do with the default ctor.
Something clever
|
|
|
|
|
Is there a difference between Visual C++ and C++
|
|
|
|
|
Question is Silly but Good
VC++ is Microsoft specific...
A Programmer Never Dies..!!
|
|
|
|
|
C++ is a programming language, Visual C++ is Microsoft's product for programming in the C++ language.
|
|
|
|
|
markkuk wrote:
C++ is a programming language, Visual C++ is Microsoft's product for programming in the C++ language.
This is the nicest (shortest and accurate) explanation
Best regards,
Alexandru Savescu
|
|
|
|
|
Can C# use the unmanaged classes I created with VC++ 6.0 before, which use many pointers ?
|
|
|
|
|
No. C# and C++ are totally different languages.
Signature space for rent. Apply by email to....
|
|
|
|
|
Yes. Just build a DLL around it.
Then from C# you call the exported DLL functions thanks to the [DllImport("mydell.dll")] attribute.
The other way is also possible. Documented in MSDN.
MS quote (http://www.microsoft.com/ddk) : As of September 30, 2002, the Microsoft® Windows® 2000 DDK, the Microsoft Windows 98 DDK, and the Microsoft Windows NT® 4.0 DDK will no longer be available for purchase or download on this site.
|
|
|
|
|
Hi,
Tell me what means "CancelIo"?
Thnx
Extreme programming. Do the No.1
|
|
|
|
|
I guess you're after API function CancelIo which "cancels all pending input and output (I/O) operations that were issued by the calling thread for the specified file handle. The function does not cancel I/O operations issued for the file handle by other threads". MSDN has the details.
Tomasz Sowinski -- http://www.shooltz.com
To some its a six-pack, to me it's a support group
|
|
|
|
|
I am working on 3D Studio Max R4 to create a plugin using visual c++6.0 However, when I tried to add a win32 API using a sample cpp file, I get this error: c2065 undeclared identifier
I have defined the API in resource.h, .rc file format and the .cpp format. However, I still get that error. In addition, I have updated my SDK in Aug 2002. Can someone solve this prob? I will be grateful for that. Thanxxx.
|
|
|
|
|