473,383 Members | 1,952 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,383 software developers and data experts.

Invalid preprocessor error

I am trying to use "::" in preprocessor directive but am continously getting error for invalid preprocessor directive. can any one tell me replacement of "::"

Expand|Select|Wrap|Line Numbers
  1. #include <iostream>
  2. #include <string.h>
  3.  
  4. #define MACRO(arg) string(::arg)
  5.  
  6. using namespace std;
  7.  
  8. int main()
  9. {
  10.    cout<<MACRO(xyz);
  11.    return 0;
  12. }

error: pasting "::" and "xyz" does not give a valid preprocessing token
Dec 16 '11 #1
2 2721
Banfa
9,065 Expert Mod 8TB
It isn't clear what you are trying to achieve using a :: in that location
Dec 16 '11 #2
weaknessforcats
9,208 Expert Mod 8TB
Also. there's no xyz to use to expand the macro.

Also, <string.h> is for C. <string> is for C++.
Dec 16 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Bradley Kite | last post by:
Hi all. I'm trying to diagnose/solve a problem with internet explorer, whereby sometimes the form submits, and other times IE produces an 'invalid syntax' error. First, I have a form, and...
5
by: Boris Kuznetsov | last post by:
This occurs in an empty project when I add the following string: #using <mscorlib.dll> Can anyone tell me why would #using ... not be working???? MSDN says nothing about this error. Please...
8
by: Owen Jenkins | last post by:
Hello. For years I've been using the DBEngine.CompactDatabase code to make backups of backend databases. But now I've struck a baffling problem where I get an Invalid Argument error. This...
0
by: Mark Phanides | last post by:
My ASP.NET application intermittantly (but always at same point) redirects to the 'Invalid Syntax Error' web page for some unknown reason. I've created a ASP.NET application written in VB.NET with...
9
by: Jamie | last post by:
I am receiving an Invalid ViewState error after posting back to the same page twice. Consistently the error occurs after the second postback and not after the first. I have looked into creating...
2
by: Schorschi | last post by:
Can't seemd to get ReadFile API to work! Returns invalid handle error? =========================================================================== Ok, the visual basic gurus, help! The...
2
by: py | last post by:
Hi, I am running python 2.4.2 on win xp pro. I have the WMI module from Tim Golden (http://tgolden.sc.sabren.com/python/wmi.html). I have some code which does this... MyScript.py...
0
by: DCC700 | last post by:
After converting a web application to 2005, I am receiving an invalid character error when I change the value in a dropdown list. The dropdown list is set to postback on selected index changed and...
5
by: Grant Edwards | last post by:
I'm trying to use the py-gnuplot module on windows, and have been unable to get it to work reliably under Win2K and WinXP. By default, it uses popen(gnuplotcmd,'w'), but in some situations that...
3
by: kakarot vegeta | last post by:
There 's an invalid syntax error but i don't know what's wrong with it. the error says Invalid syntax: print variation_string import itertools variations = itertools.product('ab',...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.