Click here to Skip to main content
15,905,963 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to restart MFC application from within itself Pin
Vinod Moorkkan4-Jan-07 17:32
Vinod Moorkkan4-Jan-07 17:32 
Questionchinese strings in String Table Pin
kiranin4-Jan-07 0:19
kiranin4-Jan-07 0:19 
AnswerRe: chinese strings in String Table Pin
2249174-Jan-07 0:47
2249174-Jan-07 0:47 
GeneralRe: chinese strings in String Table Pin
kiranin4-Jan-07 0:52
kiranin4-Jan-07 0:52 
AnswerRe: chinese strings in String Table Pin
Pradeep.Reddy4-Jan-07 6:41
Pradeep.Reddy4-Jan-07 6:41 
AnswerRe: chinese strings in String Table Pin
Mark Salsbery4-Jan-07 7:02
Mark Salsbery4-Jan-07 7:02 
AnswerRe: chinese strings in String Table Pin
Hamid_RT4-Jan-07 17:59
Hamid_RT4-Jan-07 17:59 
QuestionQuestion: Unhandled Exception on exit Pin
zqueezy3-Jan-07 23:57
zqueezy3-Jan-07 23:57 
heyhey
wow, I love this forum! hopefully someone can help with my question:
I, like many else, try to write a stable math library in VC++.
unfortunately my vector struct makes some trouble so here's the code:

...
__declspec(align(16)) union vector4{<br />
	__m128 m128;<br />
	struct {	<br />
		float x,y,z,w;<br />
	};<br />
	float  f[4];<br />
};<br />
<br />
...<br />
int main()<br />
{<br />
  vector4 a;<br />
  a.x = 1.0f; a.y = 0.0; a.z = 0.0; a.w = 1.0;<br />
  vector4 b = {1.0f, 0.0f, 0.0f, 1.0f};<br />
  a.f[0] = 1.0f; a.f[1] = 0.0f; a.f[2] = 0.0f; a.f[3] = 1.0f;<br />
  return 0;<br />
}<br />


any of those lines work fine but on exiting I get a
"Unbehandelte Ausnahme bei 0x004117a7 in MatheFunktionen.exe: 0xC0000005: Zugriffsverletzung beim Lesen an Position 0x00000800."
<=>
"unhandled exception at0x004117a7 in MathFunctions.exe: 0xC0000005: Access violation while reading at position 0x00000800."

Removing the declarations a = ... a.x =... and stuff solves the problem. Do I have to free the memory of a before quitting?

I'm using Visual Studio 2005 8.0.50727.42
any help is apprecitated

zqueezy

PS: I already googled and searched the forum but couldn't find a solution, so links would be appreciated, too
AnswerAdd Pin
zqueezy4-Jan-07 0:32
zqueezy4-Jan-07 0:32 
AnswerRe: Question: Unhandled Exception on exit Pin
prasad_som4-Jan-07 0:44
prasad_som4-Jan-07 0:44 
GeneralRe: Question: Unhandled Exception on exit Pin
zqueezy4-Jan-07 1:36
zqueezy4-Jan-07 1:36 
GeneralRe: Question: Unhandled Exception on exit Pin
prasad_som4-Jan-07 1:41
prasad_som4-Jan-07 1:41 
QuestionCPU time Pin
vc++_fragrance3-Jan-07 23:13
vc++_fragrance3-Jan-07 23:13 
AnswerRe: CPU time Pin
Hamid_RT3-Jan-07 23:30
Hamid_RT3-Jan-07 23:30 
GeneralRe: CPU time Pin
vc++_fragrance3-Jan-07 23:38
vc++_fragrance3-Jan-07 23:38 
GeneralRe: CPU time Pin
Hamid_RT3-Jan-07 23:44
Hamid_RT3-Jan-07 23:44 
GeneralRe: CPU time Pin
vc++_fragrance4-Jan-07 0:04
vc++_fragrance4-Jan-07 0:04 
GeneralRe: CPU time Pin
Hamid_RT4-Jan-07 0:09
Hamid_RT4-Jan-07 0:09 
QuestionCRecordset Pin
Bravoone_20063-Jan-07 22:05
Bravoone_20063-Jan-07 22:05 
AnswerRe: CRecordset Pin
Ray Kinsella3-Jan-07 22:26
Ray Kinsella3-Jan-07 22:26 
AnswerRe: CRecordset Pin
Hamid_RT3-Jan-07 23:37
Hamid_RT3-Jan-07 23:37 
QuestionRe: CRecordset [modified] Pin
Bravoone_20064-Jan-07 1:17
Bravoone_20064-Jan-07 1:17 
AnswerRe: CRecordset Pin
Hamid_RT4-Jan-07 17:40
Hamid_RT4-Jan-07 17:40 
AnswerRe: CRecordset Pin
vc++_fragrance4-Jan-07 0:02
vc++_fragrance4-Jan-07 0:02 
QuestionRe: CRecordset Pin
Mark Salsbery5-Jan-07 7:14
Mark Salsbery5-Jan-07 7:14 

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.