Click here to Skip to main content
15,891,880 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Registering a file type Pin
David Crow3-Nov-04 3:01
David Crow3-Nov-04 3:01 
QuestionHow to loop through window controls? Pin
Dragos1979200231-Oct-04 20:56
Dragos1979200231-Oct-04 20:56 
AnswerRe: How to loop through window controls? Pin
sps-itsec4631-Oct-04 21:42
sps-itsec4631-Oct-04 21:42 
GeneralRe: How to loop through window controls? Pin
Anonymous1-Nov-04 2:05
Anonymous1-Nov-04 2:05 
GeneralRe: How to loop through window controls? Pin
David Crow1-Nov-04 4:15
David Crow1-Nov-04 4:15 
GeneralRe: How to loop through window controls? Pin
sps-itsec461-Nov-04 4:26
sps-itsec461-Nov-04 4:26 
GeneralRe: How to loop through window controls? Pin
ThatsAlok3-Nov-04 18:50
ThatsAlok3-Nov-04 18:50 
General_asm in member fucntion of a class Pin
Manohar B. Srikanth31-Oct-04 20:23
Manohar B. Srikanth31-Oct-04 20:23 
I am using _asm{...} inside a member function of a class. within the _asm{..} I am not able to access the member variables. The compiler generates an error "variable referenced but not defined".
Why is this happening?

USING INTEL COMPILER
CODE:
/////////////////////////////////////////
#include <xmmintrin.h>

#define A16 __declspec(align(16))

class SomeVar
{
public:
SomeVar();
~SomeVar(){};
A16 float xx[4]; A16 float yy[4]; A16 float ww[4];

void Update();
};

SomeVar::SomeVar()
{
for(int i = 0; i < 4; i++)
{
xx[i] = 1.0; yy[i] = 1.1; ww[i] = 0.0;
}
}

void SomeVar::Update()
{
__asm
{
movaps xmm0, xx
movaps xmm1, yy
addps xmm0, xmm1
movaps [ww], xmm0
}

printf("\n%f %f %f %f\n\n",ww[0],ww[1],ww[2],ww[3]);
}

SomeVar sv;

int main(int argc, char* argv[])
{
printf("XmmTest\n");

sv.Update();

return 0;
}

/* Generates error:

Compiling...
Xmm.cpp
D:\Cool\Xmm\Xmm.cpp(37): error: label "xx" was referenced but not defined
movaps xmm0, xx
^
D:\Cool\Xmm\Xmm.cpp(38): error: label "yy" was referenced but not defined
movaps xmm1, yy
^
D:\Cool\Xmm\Xmm.cpp(40): error: label "ww" was referenced but not defined
movaps [ww], xmm0
^
compilation aborted for D:\Cool\Xmm\Xmm.cpp (code 2)
Error executing xicl6.exe.

Xmm.exe - 3 error(s), 0 warning(s)

*/




-- Manohar
Scientist, Defence R&D.
INDIA
GeneralRe: _asm in member fucntion of a class Pin
David Crow1-Nov-04 4:23
David Crow1-Nov-04 4:23 
GeneralAutoRestart &amp; Recovery Pin
Ajoy31-Oct-04 20:14
Ajoy31-Oct-04 20:14 
QuestionHow to disable all other applications in the Screen When opening the MFC Dialog Box.. Pin
pubududilena31-Oct-04 20:14
pubududilena31-Oct-04 20:14 
AnswerRe: How to disable all other applications in the Screen When opening the MFC Dialog Box.. Pin
Sujan Christo31-Oct-04 22:06
Sujan Christo31-Oct-04 22:06 
AnswerRe: How to disable all other applications in the Screen When opening the MFC Dialog Box.. Pin
David Crow1-Nov-04 4:24
David Crow1-Nov-04 4:24 
GeneralPlatform SDK Pin
cberam31-Oct-04 19:42
cberam31-Oct-04 19:42 
GeneralRe: Platform SDK Pin
pubududilena31-Oct-04 20:04
pubududilena31-Oct-04 20:04 
GeneralRe: Platform SDK Pin
cberam31-Oct-04 23:05
cberam31-Oct-04 23:05 
GeneralRe: Platform SDK Pin
David Crow1-Nov-04 4:30
David Crow1-Nov-04 4:30 
GeneralRe: Platform SDK Pin
cberam1-Nov-04 17:05
cberam1-Nov-04 17:05 
GeneralRe: Platform SDK Pin
David Crow2-Nov-04 2:24
David Crow2-Nov-04 2:24 
Generalvc++ Pin
Member 145406031-Oct-04 19:17
Member 145406031-Oct-04 19:17 
GeneralRe: vc++ Pin
kriaz31-Oct-04 20:03
kriaz31-Oct-04 20:03 
GeneralRe: vc++ Pin
vcplusplus1-Nov-04 3:07
vcplusplus1-Nov-04 3:07 
GeneralRe: vc++ Pin
John M. Drescher1-Nov-04 7:31
John M. Drescher1-Nov-04 7:31 
QuestionHow to read a character at a time from file?? Pin
ConradT31-Oct-04 19:06
ConradT31-Oct-04 19:06 
AnswerRe: How to read a character at a time from file?? Pin
KRowe31-Oct-04 22:34
KRowe31-Oct-04 22:34 

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.