Forum     

Go Back   Digit Technology Discussion Forum > Software > Programming
Register FAQ Calendar Mark Forums Read

Programming The destination for developers - C, C++, Java, Python and the lot


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 13-01-2009, 01:13 PM   #1 (permalink)
XLr8
 
arpanmukherjee1's Avatar
 
Join Date: Sep 2008
Posts: 637
Question variable names of c/cpp


hello people,

I was thinking about pointers that would retrieve the variable name and NOT the value....
i know that after compiled the prg does not have any var name.
but if i want to write a prg like

int a=2,b=3,sum;
sum=a+b;
cout<< THE VAR NAME "sum" <<sum;

even if the program is compiled int he debug mode
basically want to understand how var names are stored in c/c++;
arpanmukherjee1 is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 16-01-2009, 02:50 AM   #2 (permalink)
Legen-wait for it-dary!
 
dheeraj_kumar's Avatar
 
Join Date: Dec 2004
Location: Chennai
Posts: 2,471
Default Re: variable names of c/cpp

Quote:
basically want to understand how var names are stored in c/c++;
Its very simple to understand. Variable names are NOT stored in the compiled program. Its all memory locations. So you cant do what you want to do.
__________________
If the Start Windows Restart when Windows starts check box is checked Windows Restart will start automatically every time Windows is started. - Actual excerpt from a windows program help file
dheeraj_kumar is offline  
Old 16-01-2009, 03:01 AM   #3 (permalink)
Wahahaha~!
 
Faun's Avatar
 
Join Date: Dec 2006
Location: Pune/there
Posts: 7,676
Default Re: variable names of c/cpp

Compiler optimizations + Theory of Computation
__________________
Blog | Flickr | Battlelog
Spoiler:
Asus Z68 V-Pro|i5 2500k|TRUE Black|Ripjaws X|U2311H|N560GTX|D7000|XONAR STX|RE272|RE0|CC51|XE200PRO Walnut| TD II V2| Ultraphile|N5800

Mono
Faun is offline  
Old 26-01-2009, 01:37 PM   #4 (permalink)
Right Off the Assembly Line
 
Join Date: Sep 2004
Posts: 4
Default Re: variable names of c/cpp

Variable names are only programmer's reference for the memory location of the same....
ash25_nofear is offline  
Closed Thread

Bookmarks

Thread Tools
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
Scope of a variable in C++ redhat Programming 25 07-10-2008 08:53 PM
prob wid double variable prancks Programming 5 08-04-2008 04:11 PM
how add environment variable in ubuntu mak1012 Open Source 17 17-09-2007 05:48 PM
cant declare a string variable... geekgod Open Source 13 12-08-2006 06:09 AM
In Excel How to use cell ref as a variable abhijitroy Software Q&A 1 10-07-2006 02:32 PM

 
Latest Threads
- by gforz
- by soumya
- by Sujeet
- by icebags
- by Charan

Advertisement




All times are GMT +5.5. The time now is 03:05 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2