|
ThatsAlok wrote: where is key value pair
In the same header file.
|
|
|
|
|
I dont' know how to named the title!
My program is compiled by vc6+sp6+SDK2003 with release mode but have debug information in it
And there is a static member called A(faked name).
And is a instance of class CSite.CSite is inherited from a abstract class.
example:
class Base
{
void virtual int add(int a,int b)=0;
};
class CSite:public Base
{
//blablabla...
};
When debug the program and set a breakpoint at the construtor of the member A.
I found that the vtable pointer was initlialized to NULL.
And of course the program crashed!
I have no idea with this issue!
Can any one who please give me a handle on this!
BTW:there is not anything wrong if I debug the program in debug mode!
Thank you very much!
I must appologise for my poor english,hope you can understand what I said!
-- modified at 23:47 Wednesday 31st January, 2007
Don't look at me in that way!
|
|
|
|
|
Can you show this "A"?
Steve
|
|
|
|
|
A is a static instance of class CSite
<br />
class ISite<br />
{<br />
public:<br />
virtual const char* getSiteName() =0;<br />
virtual bool postRequest() =0;<br />
.....
};<br />
class CSite:public ISite<br />
{<br />
public :<br />
......<br />
}<br />
in some other cpp file,I make a static member like this:
<br />
static CSite defaultSite;<br />
Now I set Optimizations to normal in project setting!But the problem is still there!
Don't look at me in that way!
|
|
|
|
|
Can you show we where the crash occurs? I suspect you are relying on the order of static initialisation.
Steve
|
|
|
|
|
Thank you very much Hewitt!
I think I solved the problem follow your reminder.
now everything is seemed OK!
the class CSite has also some static member,and these member is defined at the 'site.cpp' ,but I define the defaultSite instance at the other cpp file (services.cpp)before!I think this is why I get a error!
Now I move the definition of defaultSite into the 'site.cpp'.
Thank you again for your help!
^_^
Don't look at me in that way!
|
|
|
|
|
I'm having a couple of little problems with a listening socket connection. I've worked with winsock before but that was a long time ago. Essentially this is the procedure.
App-A is the sender,
App-B is the receiver.
App-B is running constantly listening for a connection.
App-A(which is not always running) connects to App-B when required and sends a message, and closes the connection afterwards.
The problem I'm having is this.
if App-A executes too quickly, App-B gets an WSAECONNRESET error on calling "recv"
I can get around this by slowing App-A down with for loops/sleep commands and other such hacks, but would prefer not to do this.
The other problem I get is if App-A abnormally terminates, App-B sits in a loop constantly receiving the last message sent by App-A. This isn't a large concern as I'm deliberately causing App-A to fail as a stress test which is unlikely to occur.
I'm guessing either App-A needs to wait and ensure the message has been received before closing down, or App-B needs to queue messages somehow.
Any tips?
When I die I'd like to go peacefully in my sleep like my father, not screaming in terror like his passengers!!!
|
|
|
|
|
Hi,
are you using multiple sends and recv(s) ?
My idea is that use single send(send whole data) and do multiple recv() fn.
Once recv fn gets all bytes of data, send a single ACK to server. Thereafter you can close your server socket connection.
Bye.
Nice things do nice works
|
|
|
|
|
Thanks for the help, but I've figured it out, and the answer simply foolish .
I wasn't closing the connection correctly, hence the lack of buffer flushing
As for the repeat message, it wasn't repeating.
The message was being stored in a buffer with a static pointer, and because I neglected to check the data size returned from recv I was assuming the data pointed to was the latest message, but recv was in fact returning 0.
When I die I'd like to go peacefully in my sleep like my father, not screaming in terror like his passengers!!!
|
|
|
|
|
can someone send me the code to create application that does "autoview CD" by visual C++.
thanks verry much.
|
|
|
|
|
I think you asked this question yesterday,can you be more specific
|
|
|
|
|
Viết chương trình AutoView CD
Mô tả:
Khi chương trình chạy, thể hiện icon trên system tray.
Chương trình cần nhận biết được khi nào user đưa đĩa CD vào ổ đĩa, và tự động hiển thị danh
sách file / folder của CD lên một dialog.
Lưu ý: chỉ cần hiển thị các file/folder trong thư mục gốc của CD. Không yêu cầu cài đặt
thao tác trên file/folder (VD. mở file/folder,…)
|
|
|
|
|
What
|
|
|
|
|
when program run, show icon in system tray
program must be to know when user insert CD into drive, display automatically list file/folder of CD on a dialog
|
|
|
|
|
|
And also I think you want to read autocad files if yes see http://www.wotsit.org[^] I think its helpful for you
|
|
|
|
|
I think you want to open/load autocad files so I suggest this site but wasnt helpfuls?
|
|
|
|
|
Hello everyone,
I was wondering if anyone can be kind enough to tell me what is the difference between the Home-Made API Based Software Application that I made using Visual Studio and the Commercial Software Applications.
1- Do they use a different approach?
2- Do they have a secret recipe for their software application development?
Let me take this opportunity to thank you in advance for your help.
Khoramdin
|
|
|
|
|
What APIs are you using in your home-made application? In general, Windows apps are all based on the Win32 API, although there are several different frameworks (ATL, WTL, MFC, etc.).
|
|
|
|
|
Hi fellows
I'm using Visual C++ 2005 Express Edition and I'm getting some errors when I execute my app. This is my class that I defined in a ".h" file called "FloatText.h":
<br />
#ifndef FLOATTEXT_H<br />
#define FLOATTEXT_H<br />
class FloatText<br />
{<br />
public:<br />
FloatText();<br />
~FloatText();<br />
void SetText(char * cText);<br />
void MoveText(int iXPos, int iYPos);<br />
char * GetText();<br />
private:<br />
float m_XPos, m_YPos, m_ZPos;<br />
double m_fModelviewMatrix[16];<br />
double m_fProjectionMatrix[16];<br />
int m_iViewportMatrix[4];<br />
static int m_iTextObjects;<br />
char * m_cString;<br />
int m_iStringPos;<br />
};<br />
#endif FLOATTEXT_H<br />
I implemented this class in a ".cpp" file, and include the "FloatText.h" in the "main.cpp" too. No problems until now. When I press CTRL+F5 these errors are shown to me:
<br />
main.obj : error LNK2019: unresolved external symbol "public: char * __thiscall FloatText::GetText(void)" (?GetText@FloatText@@QAEPADXZ) referenced in function _WinMain@16<br />
main.obj : error LNK2019: unresolved external symbol "public: void __thiscall FloatText::MoveText(int,int)" (?MoveText@FloatText@@QAEXHH@Z) referenced in function _WinMain@16<br />
main.obj : error LNK2019: unresolved external symbol "public: __thiscall FloatText::FloatText(void)" (??0FloatText@@QAE@XZ) referenced in function _WinMain@16<br />
main.obj : error LNK2019: unresolved external symbol "public: void __thiscall FloatText::SetText(char *)" (?SetText@FloatText@@QAEXPAD@Z) referenced in function "long __stdcall WindowProcedure(struct HWND__ *,unsigned int,unsigned int,long)" (?WindowProcedure@@YGJPAUHWND__@@IIJ@Z)<br />
So, what's going on if the code compilation runs normally???
thanks
|
|
|
|
|
the error came because you might havent implement the following functions
GetText
MoveText
FloatText
SetText
in the cpp file or the way u implement wasnt correct. Check whether you have implemented the fu nction as shown below
eg:
char* FloatText::GetText()<br />
{<br />
return ......;<br />
}
nave
|
|
|
|
|
Alex Cutovoi wrote: I implemented this class in a ".cpp" file
Where is this cpp file. Is it included in the project.
|
|
|
|
|
Did you declare body for functions on the FloatText.cpp
|
|
|
|
|
Problem solved guys, I include the files in my project with the option, right clicking in my project and selecting "Add Existing Item". And works fine.
thanks for the support
|
|
|
|
|
I glad you find it
|
|
|
|