hi This is the simple example #include<stdio.h> #include<string.h> typedef struct { char *m; int *k; char cm; int km; }B1; void main() { B1 *base ,*base1; char...
Hi, I tried to change the value of a constant variable whose memory will be in .rdata. But I am unable to do it. Could you please go through the following code...
... Erm - if it's constant, why are you trying to change it? [snip] -- PJH #713059 +(1255)- [X] <SaintAlvus> Does the name Doctor Pavlov ring a bell?...
... Why are you using a constant if you want to change its value? -- Brett ... "In the rhythm of music a secret is hidden; If I were to divulge it, it would...
Hi, I am learning PE format and while going thru Sections details ,I just want to see whether I can change a constant value by changing characteristics of ...
Hi, I am new to VC++ and trying to install OpenGL and trying get an example program to link with the "opengl32.lib". I found some instructions from: ...
In the solution explorer, right click on the project and select properties. A dialog box should open with a tree control on the left side. On the left side,...
... <snip code> ... Think of a constant as read-only memory. Where you are going wrong is in trying to change a constant. <rant> There is no such thing as a...
Hi all, I've seen this line in an opengl program, is it for the same purpose i.e. telling the compiler to link with opengl32.lib #pragma comment(lib,...
... Actually you should do: #include "your-header.h" The quotes tell the compiler to look in the current directory first, then the system include directory. ...
Hi Ray Devore, I understood upto some extent. But have small query. IN my program ,if I define as char * const myname="gk230012" , won't we call it as a ...
Yes. I have seen this as well. However, I don't think #pragma is well supported and/or portable. I'm not sure but I'm making such a statement based on...
... Um, you sure about that? http://tech.groups.yahoo.com/group/c-prog/files/html/headers.html -- PJH #713059 +(1255)- [X] <SaintAlvus> Does the name Doctor...
Friend, You can declare a pointer and make it point to the constant. Then, you can use the indirection operator to write the new value in the address of the...
... http://tech.groups.yahoo.com/group/c-prog/files/html/headers.html ... No, I am not sure. Always thankful for greater enlightenment. Thanks, Ray ...
... Shouldn't this be: p = &c; ... Have you actually ran the code and printed the value of c? IIRC the last time this came up, *P printed out 1000 but c still...
... In char * const myname="gk230012"; myname is a constant pointer to variable data. Which means you can change the value of the data, but not the location...
I'm trying to measure the error of a double-to-float conversion, but I'm not having success. The following code demonstrates how: int main() { double x =...
... I'm not sure I see what the difficulty is ... Victor A. Wagner Jr. http://rudbek.com The five most dangerous words in the English language: "There...
Obviously, For a conversion from double to float, the double value is rounded to the nearest float value and then the convertion from float to double will...
... Sunil Depending on the compiler, there may be a difference in the magnitude of float and double. Looking at the help files for VC++7, it shows that the...
... I modified your program as follows: #include <iostream> #include <iomanip> int main() { double x = 389.298897140148174498; float w = static_cast< float>(x)...
Hi Ray, Yes. I ran this code and it is getting executed fine. Both c and *p points to 1000 only. I am getting correctly. I am using Turbo C++ 3.0. Friendly, K...
Guys ENOUGH IS ENOUGH. Think of a constant as a value placed in at compile time. For example, in the following two codes are the same. Code 1; const int c =...
OK, I finally got what I was after, which was a way to compress a double (8-bytes on my system) down to a (float, short int) pair (6-bytes on my system). The...
Hey pals!!! plz help me out in making this program in c++.. i m to Declare a pointer that holds a two dimensional array of double (data type).then Create an...
... Tulip, I will be kind. This is not a chat room, so do not use chat terms. Show us your attempt and we will help you where you get stuck. We are here to...