Click here to Skip to main content
15,886,689 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Win32 web service client over SSL Pin
eight12-May-09 22:33
eight12-May-09 22:33 
QuestionOne or many libraries? Pin
Mauro Leggieri12-May-09 14:54
Mauro Leggieri12-May-09 14:54 
AnswerRe: One or many libraries? Pin
«_Superman_»12-May-09 16:31
professional«_Superman_»12-May-09 16:31 
GeneralRe: One or many libraries? Pin
Mauro Leggieri13-May-09 2:37
Mauro Leggieri13-May-09 2:37 
QuestionCreating and Deleting a New Window Pin
BobInNJ12-May-09 12:28
BobInNJ12-May-09 12:28 
AnswerRe: Creating and Deleting a New Window Pin
Mauro Leggieri12-May-09 14:57
Mauro Leggieri12-May-09 14:57 
AnswerRe: Creating and Deleting a New Window Pin
«_Superman_»12-May-09 16:35
professional«_Superman_»12-May-09 16:35 
QuestionMemory Access Violation Pin
Ben Pedersen12-May-09 10:15
Ben Pedersen12-May-09 10:15 
Or, the common refrain for large projects and pointers?

I am working with some licensed software, so some type/function names are abbreviated as <ObjName>.

void success( const <ObjName>& fir_)
	{
		firtemp = new <ObjName>(fir_);
		std::ofstream firOut;
		firOut.open( firFile.c_str(), std::ios::binary|std::ios::out|std::ios::trunc);
		firOut << *firtemp;
		firOut.close();
	}


This is a member function of a class (it is defined inline here) which has a member variable
<ObjName> * firtemp;. firFile is a file-level const string variable.
The licensed software object <objName>> does provide an overloaded definition for the "<<" operator, and the example I'm following uses it in exactly the way I use it above to save the firtemp object to a file.

When I attempt to run this code, the firOut << *firtemp line results in a memory access violation which is fairly consistent ... it moves around very little, as in < 16 bytes or so.

One of the things i've noticed while trying to debug this error is that when I set firtemp as a watch (I'm using VS2005), and set break points at the start of the function then step through ... the value of firtemp changes wildly. Is this expected? Also, if I insert a cout statement for the value of firtemp, it does not agree at all with the value the debugger gives ... again, I'm not sure what to expect here.

Now, in the "Autos" field in the debugger, the "this" parameter has its value in red text for most of this function call ... is this normal? If not, what does it indicate? I searched online and could find no references for this simple question.

Primary Question: Is there anything obviously wrong with what I'm doing here, or is the error having to do with the licensed code/my interface to it? Any hints for trying to find the error, if it is in my interface?
AnswerRe: Memory Access Violation Pin
Nemanja Trifunovic12-May-09 10:53
Nemanja Trifunovic12-May-09 10:53 
GeneralRe: Memory Access Violation Pin
Ben Pedersen12-May-09 11:18
Ben Pedersen12-May-09 11:18 
QuestionPlugin - Dialog Handle Control Pin
Tux`12-May-09 8:28
Tux`12-May-09 8:28 
AnswerRe: Plugin - Dialog Handle Control Pin
Stuart Dootson12-May-09 9:54
professionalStuart Dootson12-May-09 9:54 
GeneralRe: Plugin - Dialog Handle Control Pin
Tux`12-May-09 10:08
Tux`12-May-09 10:08 
QuestionUnable to install platform SDK on Vista Operating System. Pin
pandit8412-May-09 7:16
pandit8412-May-09 7:16 
QuestionRe: Unable to install platform SDK on Vista Operating System. Pin
Dustin Henry12-May-09 7:36
Dustin Henry12-May-09 7:36 
AnswerRe: Unable to install platform SDK on Vista Operating System. Pin
pandit8412-May-09 8:05
pandit8412-May-09 8:05 
QuestionUsing ADO Open( ) fucntion. Pin
vital_parsley200012-May-09 7:10
vital_parsley200012-May-09 7:10 
AnswerRe: Using ADO Open( ) fucntion. Pin
CPallini12-May-09 7:55
mveCPallini12-May-09 7:55 
QuestionCAsyncSocket ? Can I use A currently active Cdialog Pin
ForNow12-May-09 5:41
ForNow12-May-09 5:41 
AnswerRe: CAsyncSocket ? Can I use A currently active Cdialog Pin
David Crow12-May-09 6:52
David Crow12-May-09 6:52 
GeneralRe: CAsyncSocket ? Can I use A currently active Cdialog Pin
ForNow12-May-09 7:50
ForNow12-May-09 7:50 
GeneralRe: CAsyncSocket ? Can I use A currently active Cdialog Pin
David Crow12-May-09 7:58
David Crow12-May-09 7:58 
GeneralRe: CAsyncSocket ? Can I use A currently active Cdialog Pin
ForNow12-May-09 8:41
ForNow12-May-09 8:41 
GeneralRe: CAsyncSocket ? Can I use A currently active Cdialog Pin
ForNow12-May-09 8:49
ForNow12-May-09 8:49 
GeneralRe: CAsyncSocket ? Can I use A currently active Cdialog Pin
David Crow12-May-09 10:32
David Crow12-May-09 10:32 

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.