Solved

how to make a macro from this-EASY

Posted on 2004-09-25
2
190 Views
Last Modified: 2010-04-01
Hi,
I tried to make a macro of this function: HPRINT(temp)
where the function is:
-----
{for (int i=0;i<strlen(temp);i++)printf("%02x00",(temp[i]) & 0xFF);}
-----
I can't get it to work. Does anyone knows what I'm doing wrong??
0
Comment
Question by:zeugje
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 50 total points
ID: 12151933
It appears to work well, I have tested:

#define HPRINT(temp) {for (int i=0;i<strlen(temp);i++)printf("%02x00",(temp[i]) & 0xFF);}
0
 

Author Comment

by:zeugje
ID: 12152005
Hmmm.....
I defined HPRIN
and tried to run HPRINT....

Thanks for your help.
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question