LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-23-2004, 04:11 AM   #1
ofada
Member
 
Registered: Jan 2004
Posts: 32

Rep: Reputation: 15
c++ linux macaddr hex


hi,
I am programming in C++ under Linux Mdk 9.2 and I've found the mac address in this format à:à}ä=:}ä=:ä=:=:} and in C I use this printf to print it normally : printf ("%.2hhx:",macaddr)
What is the equivalent with C++?I found the function IntToHex() but it run with C++ Builder but not under linux.

Thanks for your help
Bye
 
Old 03-23-2004, 03:24 PM   #2
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
Not sure this is the answer you're looking for, but you can do "printf ("%.2hhx:",macaddr)" in C++ too without problems....
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
increment in hex snutz411 Linux - Newbie 2 11-01-2005 05:54 PM
dec to hex ewt3y Linux - General 2 08-16-2005 12:01 PM
Hex socks Linux - General 4 02-17-2005 12:05 PM
footsteps in the hex andzerger Programming 2 03-12-2004 04:01 PM
hex? Nox Solaris Linux - Newbie 3 12-07-2002 08:52 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration