Click here to Skip to main content
15,917,875 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: Using app.config Pin
Red Stateler28-Feb-06 9:53
Red Stateler28-Feb-06 9:53 
Question[Message Deleted] Pin
Harrison Ford26-Feb-06 21:55
Harrison Ford26-Feb-06 21:55 
AnswerRe: How to convert a decimal value to a hexadecimal value? Pin
Cedric Moonen26-Feb-06 22:11
Cedric Moonen26-Feb-06 22:11 
General[Message Deleted] Pin
Harrison Ford26-Feb-06 22:19
Harrison Ford26-Feb-06 22:19 
GeneralRe: How to convert an integer value to a hexadecimal value? Pin
Cedric Moonen26-Feb-06 22:24
Cedric Moonen26-Feb-06 22:24 
GeneralRe: How to convert an integer value to a hexadecimal value? Pin
toxcct27-Feb-06 0:04
toxcct27-Feb-06 0:04 
GeneralRe: How to convert an integer value to a hexadecimal value? Pin
Peter Charlesworth28-Feb-06 8:05
Peter Charlesworth28-Feb-06 8:05 
AnswerRe: [Message Deleted] Pin
Peter Charlesworth27-Feb-06 2:14
Peter Charlesworth27-Feb-06 2:14 
I don't know what you want since you deleted your messages, but I hope this piece of code
helps.
One thing to know is that the standard representation of values is decimal.
Other possibilities: hex (hexal), bin (binairy), oct (octal).

<br />
#include < iostream ><br />
// needed for input/output manipulation<br />
#include < iomanip ><br />
using namespace std;<br />
<br />
int main()<br />
{<br />
	int a;<br />
	int b;<br />
<br />
	cout << "Please enter a decimal number which this program\nwill convert to a hexal number.\n";<br />
        // the user inputs a value into a<br />
	cin >> a;       <br />
        // the program displays the value in a but in a hexal representation<br />
	cout << "\nYour number is " << hex << a << " in hexal.\n\n";<br />
	getchar(); // waits for user input<br />
<br />
	cout << "Please enter a hexal number which this program\nwill convert to a decimal number.\n";<br />
        // the user inputs a value into b, which the program sees as a hexal representation of that value<br />
	cin >> hex >> b;<br />
        // the hexal value stored in b will be displayed in a decimal representation<br />
	cout << "\nYour number is " << dec << b << " in decimal.\n\n";<br />
        // waits for user input<br />
	getchar(); <br />
<br />
	return 0;<br />
}<br />


Regards,

Peter
GeneralRe: [Message Deleted] Pin
toxcct27-Feb-06 6:23
toxcct27-Feb-06 6:23 
GeneralRe: [Message Deleted] Pin
Peter Charlesworth27-Feb-06 6:46
Peter Charlesworth27-Feb-06 6:46 
GeneralRe: [Message Deleted] Pin
toxcct27-Feb-06 6:47
toxcct27-Feb-06 6:47 
QuestionGet 3rd character. Pin
foolygoofy2626-Feb-06 9:21
foolygoofy2626-Feb-06 9:21 
AnswerRe: Get 3rd character. Pin
Christian Graus26-Feb-06 10:03
protectorChristian Graus26-Feb-06 10:03 
AnswerRe: Get 3rd character. Pin
Saksida Bojan28-Feb-06 6:30
Saksida Bojan28-Feb-06 6:30 
QuestionDAO in .NET application Pin
Ahmed Al-Lakani26-Feb-06 7:24
Ahmed Al-Lakani26-Feb-06 7:24 
QuestionExpose dll to VBA Pin
prrusa26-Feb-06 5:52
prrusa26-Feb-06 5:52 
Questionconsole screen size Pin
Peter Charlesworth26-Feb-06 5:42
Peter Charlesworth26-Feb-06 5:42 
AnswerRe: console screen size Pin
George L. Jackson26-Feb-06 11:57
George L. Jackson26-Feb-06 11:57 
GeneralRe: console screen size Pin
Peter Charlesworth26-Feb-06 12:06
Peter Charlesworth26-Feb-06 12:06 
GeneralRe: console screen size Pin
George L. Jackson27-Feb-06 1:10
George L. Jackson27-Feb-06 1:10 
GeneralRe: console screen size Pin
Peter Charlesworth27-Feb-06 2:03
Peter Charlesworth27-Feb-06 2:03 
GeneralRe: console screen size Pin
George L. Jackson27-Feb-06 11:14
George L. Jackson27-Feb-06 11:14 
QuestionC++ and color Pin
marc199026-Feb-06 3:36
marc199026-Feb-06 3:36 
AnswerRe: C++ and color Pin
Christian Graus26-Feb-06 10:04
protectorChristian Graus26-Feb-06 10:04 
GeneralRe: C++ and color Pin
marc199026-Feb-06 20:57
marc199026-Feb-06 20:57 

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.