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 04-07-2007, 10:45 AM
phantom3380's Avatar   
phantom3380 phantom3380 is offline
Newbie
 
Join Date: Apr 2007
Posts: 15
Rep Power: 7
phantom3380 is on a distinguished road
Default Variables: Char

No matter how hard I try, i CANNOT assign a value for char type. In theory it should go:

char whatever = whicheverletter;
cout << whatever << endl;

But, i can't get the sucker to run without getting an error after compiling...what am i doing wrong?
__________________
Yea as it was writ: "Compile and Run"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 04-07-2007, 03:29 PM
icepack's Avatar   
icepack icepack is offline
Programmer
 
Join Date: Jul 2006
Location: North Carolina
Posts: 115
Rep Power: 9
icepack is on a distinguished road
Send a message via AIM to icepack
Default

what is whicheverletter?

are you trying:

char whatever = A

or

char whatever = 'A';

try the single quote
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-07-2007, 03:54 PM
phantom3380's Avatar   
phantom3380 phantom3380 is offline
Newbie
 
Join Date: Apr 2007
Posts: 15
Rep Power: 7
phantom3380 is on a distinguished road
Default

Quote:
Originally Posted by icepack View Post
what is whicheverletter?

char whatever = 'A';

try the single quote
The single quote is definitely what i am having trouble with...can't seem to find it on my keyboard though...
__________________
Yea as it was writ: "Compile and Run"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-08-2007, 04:38 PM
John's Avatar   
John John is offline
Co-Administrator
 
Join Date: Jul 2006
Age: 20
Posts: 3,478
Last Blog:
Joomla! And Incompeten...
Rep Power: 20
John has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond repute
Send a message via AIM to John Send a message via MSN to John
Default

What kind of keyboard do you have? A single quote is just a double quote with out pressing shift

Or you can just copy/paste this

'
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-09-2007, 03:17 AM
phantom3380's Avatar   
phantom3380 phantom3380 is offline
Newbie
 
Join Date: Apr 2007
Posts: 15
Rep Power: 7
phantom3380 is on a distinguished road
Default

ummmm (grins sheepishly)

It turns out the single quote was right next to my return key, having spent ten minutes trying to find it
__________________
Yea as it was writ: "Compile and Run"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Works when i have an int NoName C and C++ 1 08-28-2007 12:25 AM
Variables clookid PHP Tutorials 1 01-11-2007 09:40 PM
Flex, bison multifunction calculator annatsos C and C++ 1 01-04-2007 07:00 AM
Variables Sionofdarkness Java Help 4 08-21-2006 03:32 PM


All times are GMT -5. The time now is 04:21 AM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 100%


Complete - Celebrate!

Ads