int main ()
{
int firstvalue, secondvalue;
int * mypointer;
mypointer = &firstvalue;
*mypointer = 10;
mypointer = &secondvalue;
*mypointer = 20;
cout << "firstvalue is " << firstvalue << endl;
cout << "secondvalue is " << secondvalue << endl;
return 0;
}
Is this storing the value of 10 and 20 to the locations of firstvalue and secondvalue respectively? Or of firstvalue and secondvalue being defined as 10 and 20?
I ask this because earlier i read that you should read from right to left always when programming?
thanks in advanced im so confused
Idk im kinda interested in viruses already. not really to do any damage just to kinda study.
i thought basically what viruses do are replicate and alter different key memory address values?
i know thats far out there considering im still asking questions about extremely basic concepts right now though.
the variables arent for anything. this was just an example i was looking at in the manual. maybe i misunderstood and you already understood this code was meaningless though. could you give me an example on what you mean using this code?
I fooled around with putting stuff into BIOS on an old DOS machine years ago, but that was using assembly language which is way, way too hard for a novice programmer.
The things we did back then don't work any more, because people have wised up to that sort of blatant attack.
We had our problems, having to replace a BIOS chip to get the machine to go again.
If you want to study viruses , do it under the guidance of a University Lecturer. If I was a Lecturer, I wouldn't let anyone study viruses until they had a masters degree.
How can i actually learn how to program. ive learned a lot of stuff http://www.cplusplus.com/files/tutorial.pdf
there. but i feel like im not really learning how to apply different techniques at the same time. maybe im not far enough into the tutorial yet. Im just at pointers.
Just practice. Find some interesting sounding problems, and work out how to solve them programmatically (real word?).
projecteuler.com has some pretty fun math related programs to do. They can be really challenging and require either strong math ability, or ability to look up how to solve problems you've probably never thought of before.