i have created a dialog based application for calender.
coding is
void CcalenderDlg::D blClickCalendar 1()
{
CString cSelectedDate;
char* cDay="";
char* cYear="";
itoa(m_calender .get_Day (),cDay,10);
cSelectedDate=c Day;
switch(m_calend er.get_Month ())
{
case 1: cSelectedDate+= "Jan";
break;
case 2: cSelectedDate+= "Feb";
break;
case 3: cSelectedDate+= "Mar";
break;
case 4: cSelectedDate+= "Apr";
break;
case 5: cSelectedDate+= "May";
break;
case 6: cSelectedDate+= "Jun";
break;
case 7: cSelectedDate+= "Jul";
break;
case 8: cSelectedDate+= "Aug";
break;
case 9: cSelectedDate+= "Sep";
break;
case 10: cSelectedDate+= "Oct";
break;
}
itoa(m_calender .get_Year (),cYear,10);
cSelectedDate+= cYear;
LPSTR OriginChar= cSelectedDate.G etBuffer(0);
MessageBox("U dbl Clicked");
//////MessageBox("u dbl clicked",Origin Char,MB_OK);
//cSelectedDate.R eleaseBuffer();
}
initially it was giving errors with messagebox
now when i click on some date in calender it is giving exception
errors-
calender.exe': Loaded 'C:\Documents and Settings\Reetu\ My Documents\Visua l Studio 2005\Projects\c alender\debug\c alender.exe', Symbols loaded.
'calender.exe': Loaded 'C:\WINNT\syste m32\NTDLL.DLL', Cannot find or open a required DBG file.
'calender.exe': Loaded 'C:\WINNT\syste m32\mfc80d.dll' , Symbols loaded.
'calender.exe': Loaded 'C:\WINNT\syste m32\msvcr80d.dl l', Symbols loaded.
'calender.exe': Loaded 'C:\WINNT\syste m32\msvcrt.dll' , No symbols loaded.
'calender.exe': Loaded 'C:\WINNT\syste m32\KERNEL32.DL L', Cannot find or open a required DBG file.
'calender.exe': Loaded 'C:\WINNT\syste m32\GDI32.DLL', Cannot find or open a required DBG file.
'calender.exe': Loaded 'C:\WINNT\syste m32\USER32.DLL' , Cannot find or open a required DBG file.
'calender.exe': Loaded 'C:\WINNT\syste m32\shlwapi.dll ', No symbols loaded.
'calender.exe': Loaded 'C:\WINNT\syste m32\ADVAPI32.DL L', Cannot find or open a required DBG file.
'calender.exe': Loaded 'C:\WINNT\syste m32\rpcrt4.dll' , Cannot find or open a required DBG file.
'calender.exe': Loaded 'C:\WINNT\syste m32\comctl32.dl l', Cannot find or open a required DBG file.
'calender.exe': Loaded 'C:\WINNT\syste m32\OLEAUT32.DL L', Cannot find or open a required DBG file.
'calender.exe': Loaded 'C:\WINNT\syste m32\OLE32.DLL', Cannot find or open a required DBG file.
'calender.exe': Loaded 'C:\WINNT\syste m32\mfc80ENU.dl l', Binary was not built with debug information.
'calender.exe': Loaded 'C:\WINNT\syste m32\EntAPI.dll' , No symbols loaded.
'calender.exe': Loaded 'C:\WINNT\syste m32\psapi.dll', Cannot find or open a required DBG file.
'calender.exe': Loaded 'C:\WINNT\syste m32\NETAPI32.DL L', Cannot find or open a required DBG file.
'calender.exe': Loaded 'C:\WINNT\syste m32\secur32.dll ', Cannot find or open a required DBG file.
'calender.exe': Loaded 'C:\WINNT\syste m32\netrap.dll' , Cannot find or open a required DBG file.
'calender.exe': Loaded 'C:\WINNT\syste m32\samlib.dll' , Cannot find or open a required DBG file.
'calender.exe': Loaded 'C:\WINNT\syste m32\ws2_32.dll' , Cannot find or open a required DBG file.
'calender.exe': Loaded 'C:\WINNT\syste m32\ws2help.dll ', Cannot find or open a required DBG file.
'calender.exe': Loaded 'C:\WINNT\syste m32\WLDAP32.DLL ', Cannot find or open a required DBG file.
'calender.exe': Loaded 'C:\WINNT\syste m32\dnsapi.dll' , Cannot find or open a required DBG file.
'calender.exe': Loaded 'C:\WINNT\syste m32\wsock32.dll ', Cannot find or open a required DBG file.
'calender.exe': Unloaded 'C:\WINNT\syste m32\EntAPI.dll'
'calender.exe': Unloaded 'C:\WINNT\syste m32\NETAPI32.DL L'
'calender.exe': Unloaded 'C:\WINNT\syste m32\dnsapi.dll'
'calender.exe': Unloaded 'C:\WINNT\syste m32\wsock32.dll '
'calender.exe': Unloaded 'C:\WINNT\syste m32\WLDAP32.DLL '
'calender.exe': Unloaded 'C:\WINNT\syste m32\ws2_32.dll'
'calender.exe': Unloaded 'C:\WINNT\syste m32\ws2help.dll '
'calender.exe': Unloaded 'C:\WINNT\syste m32\samlib.dll'
'calender.exe': Unloaded 'C:\WINNT\syste m32\netrap.dll'
'calender.exe': Unloaded 'C:\WINNT\syste m32\secur32.dll '
'calender.exe': Unloaded 'C:\WINNT\syste m32\psapi.dll'
'calender.exe': Loaded 'C:\WINNT\syste m32\clbcatq.dll ', Cannot find or open a required DBG file.
'calender.exe': Loaded 'C:\WINNT\syste m32\msi.dll', No symbols loaded.
'calender.exe': Loaded 'C:\Program Files\Microsoft Office\OFFICE11 \MSCAL.OCX', No symbols loaded.
'calender.exe': Loaded 'C:\WINNT\syste m32\COMDLG32.DL L', Cannot find or open a required DBG file.
'calender.exe': Loaded 'C:\WINNT\syste m32\SHELL32.DLL ', Cannot find or open a required DBG file.
First-chance exception at 0x1025714a (msvcr80d.dll) in calender.exe: 0xC0000005: Access violation writing location 0x00425d78.
Unhandled exception at 0x1025714a (msvcr80d.dll) in calender.exe: 0xC0000005: Access violation writing location 0x00425d78.
The program '[1628] calender.exe: Native' has exited with code 0 (0x0).
1 1577
You access violation is here:
char* cDay="";
char* cYear="";
itoa(m_calender .get_Day (),cDay,10);
cDay is not a buffer. It is a pointer to a literal. That makes it const. When
itoa() tries to write to cDay is when you get your access violation.
cDay needs to be a char array: -
char cDay[10] = ""; //I'm just guessing the 10
-
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: AIM |
last post by:
Error in msvc in building inheritance.obj to build hello.pyd
Hello,
I am trying to build the boost 1.31.0 sample extension hello.cpp.
I can not compile the file inheritance.cpp because the two
files containing some templates: adjacency_list.hpp and mem_fn.hpp can
not compile.
Does anyone have any solutions?
|
by: Chris Stankevitz |
last post by:
I can't tell you how frusterated I and my coworkers are with "MSVC 7.1 .net
2003" (what am I supposed to call this thing anyway?).
Compiling and linking take twice as long with "MSVC 7.1 .net 2003" than with
MSVC 6. My coworkers are angry at "MSVC .net 7.1 2003" and they're angry at
me for pushing it (due to better C++ compliance).
The...
|
by: Uli |
last post by:
Hello,
I'm trying to use a DLL (by static linking) which was compiled with Borland
C++Builder (BCB) in Visual C++ (Visual-Studio 2003).
All functions are declared with the directive 'extern "C"' so that a
cross-compiler-usage must be possible.
I created an import library (.lib) for MSVC by using the LIB function and
using a .DEF file...
|
by: brckcc |
last post by:
I've got a managed extension library that I'm attempting to convert from MSVC
2003 to MSVC 2005.
I've converted the project file and am now attempting to compile the
application.
I get multiple occurrences of the following linker errors:
extern "C" void __clrcall ___CxxCallUnwindDtor(void (__clrcall*)(void
*),void *)"...
|
by: Niels Dekker - no reply address |
last post by:
The following attempt to pass my template "Base" as a template template
argument was rejected by Microsoft VC++ 8.0 (2005), while it still works
on VC++ 7.1 (2003). Is it correct C++? And is there a workaround?
template <typename T> class Base
{
};
template <typename U, template <typename> class TempTemp>
class Derived;
| |
by: Nindi |
last post by:
I cannot get the following code to compile under MSVC 2003 or 2005.
...........................................................................................
#include<stdio.h>
struct _MyStruct;
typedef struct _MyStruct MyStruct;
typedef void (*funcType)(MyStruct *);
|
by: salunkerahul |
last post by:
Hello All,
I have some static libraries generated on MSVC 2005 express edition and I have to use them along with static libraries created with MSVC 2003 and create an application on MSVC2003.
example.lib - generated on MSVC2005
All other libs - generated on MSVC2003
I have attached the compiler options as well as the error log along. ...
|
by: hsmit.home |
last post by:
I spent way too much time on this and I must say, I was a little
disgruntled with what has been posted on all the various Xalan C
mailing lists. Everyone says there's a solution, but give next to no
detail on how to achieve this "allusive" solution. Well I spent the
better part of a day finally figuring it out the hard way, trial and
error.
...
|
by: ma |
last post by:
Hello,
Some questions about upgrading to MSVC 2008.
1- I am using MSVC2005, Do you recommend that I upgrade to MSVC 2008 Beta 2?
2- When the MSVC2008 will be officially release?
3- Where can I download MSVC 2008 Beta 2?
|
by: hsmit.home |
last post by:
Hello,
I came across a strange error and it's really been bugging me. Maybe
someone else has come across this and any insight would be
appreciated.
What I'm trying to accomplish is using boost::lexical_cast to cast a
vector of strings to a string.
The compiler I'm using is MSVC++ 2005 Express Edition. The gc++
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |