Solved

Volatile variable

Posted on 1998-08-24
1
245 Views
Last Modified: 2010-05-18
Hi friends,
           please explain what's the use in declaring a
volatile variable as constant.
Thanxs in advance.
0
Comment
Question by:mala082398
1 Comment
 
LVL 2

Accepted Solution

by:
JYoungman earned 0 total points
ID: 1171032
"volatile" indicates that the object is modified by something not directly under the compiler's control (i.e. the hardware itself, or another thread of control).   An example might be the global variable that keeps track of the total number of timer interrupts, or a hardware clock.

You should probably reject the answer I gave to the other version of this question.

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Visual c++ and text files 7 60
What does std::atomic give me? 7 114
Arduino EDI - Programming language 3 80
Dialogbox API leak? 18 81
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now