Solved

Volatile variable

Posted on 1998-08-24
1
244 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
Comment Utility
"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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

743 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

16 Experts available now in Live!

Get 1:1 Help Now