Lost Password?

Go Back   CodeCall Programming Forum > Software Development > C and C++

C and C++ C and C++ forum for discussing all forms of C except for C#. These languages are powerful low level languages used for creating Operating Systems, Device Drivers, compilers and much more.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-17-2008, 01:20 PM
xxxitaliaxxx13 xxxitaliaxxx13 is offline
Newbie
 
Join Date: Mar 2008
Posts: 1
Rep Power: 0
xxxitaliaxxx13 is on a distinguished road
Default Software help

Hey guys im new here and not to sure if im posting this in the right area but i need abit of help with a couple "easy" programs. Im trying to write a short test program that will

1) display an unsigned integer to the screen as a hex number from 0000 to FFFF
2) display an unsigned integer to the screen as a decimal number from 0 65535
3) read a 4 digit hex number, 0000 to FFFF, and store it as a unsigned int.
4) read a 5 digit dec. number, 00000 to 65535, and store it as a unsigned int.

if any can help me out that would be amazing
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 03-17-2008, 03:23 PM
Jordan's Avatar   
Jordan Jordan is offline
Administrator
 
Join Date: Nov 2005
Location: Hendersonville, NC
Age: 26
Posts: 5,942
Last Blog:
Performance or Maintai...
Rep Power: 20
Jordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud of
Send a message via ICQ to Jordan Send a message via AIM to Jordan Send a message via MSN to Jordan
Default Re: Software help

Do you have any code so far? To display use "cout". To read input into variables use "cin". Do you know how to declare integer variables?
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog
Don't hesitate to ask any questions that you have! Check out our ASCII Calculator!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-18-2008, 04:23 PM
G_Morgan G_Morgan is offline
Guru
 
Join Date: Oct 2007
Age: 24
Posts: 408
Rep Power: 8
G_Morgan has a spectacular aura aboutG_Morgan has a spectacular aura aboutG_Morgan has a spectacular aura about
Default Re: Software help

It's worth asking if you are using C or C++. The answer varies dependent.

If you are using C you'll want to replace cin/cout with scanf and printf.
__________________
Currently bemused by: LLVM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 03-22-2008, 01:11 PM
dargueta dargueta is offline
Guru
 
Join Date: Oct 2007
Age: 18
Posts: 507
Last Blog:
Programs Under the Hoo...
Rep Power: 10
dargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the rough
Default Re: Software help

For C, use printf and scanf like so:

1) printf("%04X",myUInt);
2) printf("%u",myUInt);
3) scanf("%4x",&myUInt);
4) scanf("%d",&myUInt);
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Software Dungeon bungman Shareware Sites 10 08-21-2008 06:45 AM
Successfully Selling Your Software Jordan Tutorials 11 07-16-2008 05:25 PM
Get installed software information IUnknown Software Development Tools 5 10-15-2007 06:29 PM


All times are GMT -5. The time now is 02:38 AM.

Contest Stats

John ........ 223.00000
dargueta ........ 168.00000
Xav ........ 164.00000
LogicKills ........ 20.00000
gaylo565 ........ 18.00000
WingedPanther ........ 15.00000
|pH| ........ 15.00000
Johnnyboy ........ 3.00000
navghost ........ 1.00000

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 67%

Ads