Click here to Skip to main content
15,909,742 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionVERTICAL SCROLL is visible or available Pin
Killer312-May-06 3:13
Killer312-May-06 3:13 
AnswerRe: VERTICAL SCROLL is visible or available Pin
Naveen12-May-06 3:25
Naveen12-May-06 3:25 
GeneralRe: VERTICAL SCROLL is visible or available Pin
SimonSays12-May-06 10:51
SimonSays12-May-06 10:51 
Questionhow to save the time in a text file... Pin
BishoyShoukry12-May-06 2:40
BishoyShoukry12-May-06 2:40 
AnswerRe: how to save the time in a text file... Pin
vikramlinux12-May-06 2:45
vikramlinux12-May-06 2:45 
QuestionRe: how to save the time in a text file... Pin
David Crow12-May-06 4:19
David Crow12-May-06 4:19 
AnswerRe: how to save the time in a text file... Pin
ThatsAlok12-May-06 4:43
ThatsAlok12-May-06 4:43 
Questionthe same code compiling in devc++ but not in VS2005 Pin
sawerr12-May-06 1:40
sawerr12-May-06 1:40 
Hi thsi is my code:
<br />
#include <cstdlib><br />
#include <iostream><br />
<br />
using namespace std;<br />
<br />
class C{<br />
private :<br />
	int  i ;<br />
	char * ch;<br />
	<br />
public :<br />
	C();<br />
	C(int,char *);<br />
        ~C();<br />
};<br />
C::C(int a,char * d)<br />
{<br />
	cout << "initializing";<br />
 i = a;<br />
 ch = new char[strlen(d)+1];<br />
  strcpy(ch, d);<br />
 <br />
<br />
}<br />
C::C()<br />
{<br />
	cout << "default";<br />
}<br />
C::~C()<br />
{<br />
	cout << "deleting";<br />
	delete[]  ch;<br />
}<br />
<br />
int main(int argc, char* argv[])<br />
{<br />
	C c;<br />
	C * c1 = new C(10,"string");<br />
	delete c1;<br />
	<br />
    return 0;<br />
}<br />


this code when i start debugging ,it compiled then start executing when closing it gives(in VS2005):
"Windows has triggered a breakpoint in sdf.exe.

This may be due to a corruption of the heap, and indicates a bug in sdf.exe or any of the DLLs it has loaded.

The output window may have more diagnostic information"

Why do i get this error in VS 2005 but not in dev c++.What is wrong?I can not the solve the problem in my code or in my debugger or something else..
Thanks...

-- modified at 7:42 Friday 12th May, 2006
AnswerRe: the same code compiling in devc++ but not in VS2005 Pin
Cedric Moonen12-May-06 1:50
Cedric Moonen12-May-06 1:50 
GeneralRe: the same code compiling in devc++ but not in VS2005 Pin
sawerr12-May-06 1:59
sawerr12-May-06 1:59 
JokeRe: the same code compiling in devc++ but not in VS2005 Pin
James R. Twine12-May-06 2:35
James R. Twine12-May-06 2:35 
GeneralRe: the same code compiling in devc++ but not in VS2005 Pin
Gary R. Wheeler13-May-06 3:24
Gary R. Wheeler13-May-06 3:24 
Questionhow to write text in word application Pin
m_amit5012-May-06 1:24
m_amit5012-May-06 1:24 
AnswerRe: how to write text in word application Pin
_AnsHUMAN_ 12-May-06 1:28
_AnsHUMAN_ 12-May-06 1:28 
QuestionScrollbar Drawing message Pin
Sarath C12-May-06 0:58
Sarath C12-May-06 0:58 
AnswerRe: Scrollbar Drawing message Pin
Naveen12-May-06 1:23
Naveen12-May-06 1:23 
QuestionUnhandled Exception Pin
Anu_Bala12-May-06 0:44
Anu_Bala12-May-06 0:44 
AnswerRe: Unhandled Exception Pin
toxcct12-May-06 0:46
toxcct12-May-06 0:46 
AnswerRe: Unhandled Exception Pin
VinayCool12-May-06 0:50
VinayCool12-May-06 0:50 
GeneralRe: Unhandled Exception Pin
toxcct12-May-06 0:51
toxcct12-May-06 0:51 
GeneralRe: Unhandled Exception Pin
Anu_Bala12-May-06 0:56
Anu_Bala12-May-06 0:56 
GeneralRe: Unhandled Exception Pin
Hamid_RT12-May-06 1:12
Hamid_RT12-May-06 1:12 
GeneralRe: Unhandled Exception Pin
Cedric Moonen12-May-06 1:16
Cedric Moonen12-May-06 1:16 
GeneralRe: Unhandled Exception Pin
Hamid_RT12-May-06 1:19
Hamid_RT12-May-06 1:19 
GeneralRe: Unhandled Exception Pin
kakan12-May-06 2:23
professionalkakan12-May-06 2:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.