GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 01-Aug-2006, 05:51
Kezern Kezern is offline
New Member
 
Join Date: Aug 2006
Posts: 1
Kezern is on a distinguished road

Global variables


Hi all!
I have a problem with C++. I have several cpp files. And in one of them in one of the functions I have a variable defined as.
unsigned short* dst.
I would like to read that variable from another function in other cpp file. Hoy I must define it? I think it must be easy but I'm having lots of problems
  #2  
Old 01-Aug-2006, 09:27
davis
 
Posts: n/a

Re: Global variables


Quote:
Originally Posted by Kezern
Hi all!
I have a problem with C++. I have several cpp files. And in one of them in one of the functions I have a variable defined as.
unsigned short* dst.
I would like to read that variable from another function in other cpp file. Hoy I must define it? I think it must be easy but I'm having lots of problems

You shouldn't use globals. If you must, then declare it extern.


:davis:
 
 

Recent GIDBlogStupid Management Policies by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
passing variables out of an iframe by url JUNK KED MySQL / PHP Forum 5 31-Jul-2007 10:33
How do you SAFELY pass hidden variables through merchant account payment screens? mrsurrey eCommerce / Merchant Account Forum 4 03-Jul-2006 16:28
linking libraries removes variables svhb C++ Forum 1 06-Dec-2005 04:50
The Use of GLobal variables Peter11111 C Programming Language 3 12-Aug-2005 09:08
variables return to previous value after i try to set them nasaiya MS Visual C++ / MFC Forum 2 14-Jun-2005 01:43

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 15:58.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.