473,387 Members | 1,534 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

_asm NOP : undeclared identifier

Hi,

if (iter->m_name.compare(pstrName) == 0)
{
// Provide our object.
*ppunkItem = iter->m_pUnknown;
// Addref our object...
iter->m_pUnknown->AddRef();
break;
}
else
{
_asm NOP;
}

I am getting the errors:

abc.cpp(223) : error C2065: '_asm' : undeclared identifier
abc.cpp(223) : error C2146: syntax error : missing ';' before
identifier 'NOP'
abc.cpp(223) : error C2065: 'NOP' : undeclared identifier
Could anyone suggest me the solution for these errors.
respects,
Saurabh Aggrawal

Jul 22 '05 #1
3 4809

Saurabh Aggrawal wrote:
Hi,

if (iter->m_name.compare(pstrName) == 0)
{
// Provide our object.
*ppunkItem = iter->m_pUnknown;
// Addref our object...
iter->m_pUnknown->AddRef();
break;
}
else
{
_asm NOP;
}

I am getting the errors:

abc.cpp(223) : error C2065: '_asm' : undeclared identifier
abc.cpp(223) : error C2146: syntax error : missing ';' before
identifier 'NOP'
abc.cpp(223) : error C2065: 'NOP' : undeclared identifier


Sure. _asm isn't C++. I guess the C++ equivalent would be a semicolon
by itself. Of course, if that program contains more
non-C++, that may need to be changed too.

Regards,
Michiel Salters

Jul 22 '05 #2
It solved the problem, thanks for the help.

Jul 22 '05 #3
msalters wrote:
Saurabh Aggrawal wrote:
Hi,

if (iter->m_name.compare(pstrName) == 0)
{
// Provide our object.
*ppunkItem = iter->m_pUnknown;
// Addref our object...
iter->m_pUnknown->AddRef();
break;
}
else
{
_asm NOP;
}

I am getting the errors:

abc.cpp(223) : error C2065: '_asm' : undeclared identifier
abc.cpp(223) : error C2146: syntax error : missing ';' before
identifier 'NOP'
abc.cpp(223) : error C2065: 'NOP' : undeclared identifier

Sure. _asm isn't C++. I guess the C++ equivalent would be a semicolon
by itself. Of course, if that program contains more
non-C++, that may need to be changed too.

Regards,
Michiel Salters


Be aware though, that the compiler may optimize away
any null statements. Forcing the compiler not to is
another task entirely.

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.comeaucomputing.com/learn/faq/
Other sites:
http://www.josuttis.com -- C++ STL Library book
http://www.sgi.com/tech/stl -- Standard Template Library

Jul 22 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: W. Van Hooste | last post by:
Just starting with C, can somebody explain why this does not work or point me in the right direction? I wrote some tools and did some coding but cant seem to get this one. I DID declare my FILE...
5
by: Marc Gustafson | last post by:
This function is executed when a application file is double-clicked to open in a VC++ application. Specifically, this function is enabled by RegisterShellFileTypes () in the application's...
0
by: Stephanie Doherty | last post by:
Hello World, I am trying to use a _spawnl function like this (and I have included the process.h file): _spawnl(_P_WAIT,iporgfile,iporgfile,NULL); It compiles with the following errors: ...
6
by: Peter Rothenbuecher | last post by:
Hello, when I try to compile the following code with g++ -o client client.c #include<sys/socket.h> #include<stdio.h> #include<stdlib.h> #define ADDRESS "mysocket"; #define MAXLEN 200;
10
by: teddarr | last post by:
I am trying to construct a class with several functions and identifiers. The identifier in question is static double AIR which will hold the value of the annual interest rate in the class. I have...
2
by: aarthi28 | last post by:
Hi, I have this code that I am trying to compile, but I am getting the following errors 'CoInitializeSecurity': identifier not found 'EOAC_NONE' : undeclared identifier I have pasted the...
5
by: vmagana | last post by:
First of all I would like to indicate that I am a newbie a programming. I am having a problem compiling a sample source code that I downloaded from microsoft. When I try to build the program I get...
3
by: Anna Smidt | last post by:
Thanks for the help so far. I have some problems left. One of them is an undeclared identifier, but it's unclear to me why the compiler fights with me. It says "iter: undeclared identifier" I...
1
by: LuxCkrown | last post by:
Hey everyone, i've been browsing for a fix to my problem 1>c:\documents and settings\user\desktop\judis_repack\judis repack\judis repack\maplestoryserver\inventory.cpp(386) : error C2065: 'amount'...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.