Maritimo 15 Junior Poster in Training

Yes, it is perfectly possible to solve that problem in C++.

Maritimo 15 Junior Poster in Training

The memory is measured in bytes.
1k bytes are 1024 bytes (not 1000 bytes). This is because the memory space is expresed in powers of two:

2^0=1
2^1=2
2^2=4
2^3=8
2^4=16
2^5=32
2^6=64
2^7=128
2^8=256
2^9=512
2^10=1024 <--- This is why 1k of memory has 1024 bytes.
2^11=2048
2^12=4096 <--- In your problem, one page of memory is 4k with 4096 bytes.

1kB = 1024 bytes
1MB = 1k x 1k memory = 1024x1024 = 1048576 bytes.
1GB 0 1M x 1k = 1k x 1k x 1k = 1024x1024x1024 = 1073741824 bytes

In the rest (of your live):
"k" means 1024
"M" means 1024 x 1024 = 1048576
"G" means 1024 x 1024 x 1024 = 1073741824

4kB = 4x1024 = 4096 bytes is one page of memory.

2^32 has 4294967296 bytes is your total space for your table.

2^32/1024 = 4194304 k bytes = 4194304x1024.
2^32/1024/1024 = 4096 M bytes = 4096x1024x1024.
2^32/1024/1024/1024 = 4GB = 4 x 1024 x 1024 x 1024.

That is: you have 4GB of total space memory. (The question is wrong because it says 4MB and must say 4GB).

2^32/1024/4 = 2^32/4096 = 1048576 pages of memory.

2^20 = 1048576. That is, you have 2^20 pages of memory.

2^20 = 1048576 = 1024x1024. That is you have 1024 k pages of memory.

You have 1M pages of memory and each page has 4k …

Maritimo 15 Junior Poster in Training

I don't think this web is to teach how to crack a programm. Anyway, if you want to crack a code, you need to know a lot that seems you don't. So I recomend don't try to solve this here, you must study a lot. Your first step shuld be to learn assembler.

RikTelner commented: I'm here to get knowledge, if you're here to throw me objections then go somewhere else. Nobody talks here about me learning how to crack, I found it interesting and then I found new questions on horizon, which I post here. +0
Maritimo 15 Junior Poster in Training

I recomend you to use switch...case clause:

for(int i=1; i<=12; i++)
{
   cout << i << ' ',
   switch(i)
   {
     case 1: cout << "My first message\n"; break;
     case 2: cout << "My second\n"; break;
     //...
   }
}
Maritimo 15 Junior Poster in Training

I recomend you to learn C++11 directly. Learning C is the long way to C++98 to C++03 to C++11 and do not have any benefit. As a matter of fact, the style of programming and the way of think has evolved a lot. With C++11 there are many things you must forget from C++03 from C++98 form C. So jump directly to the best.

Note: There are a just new version called C++14 but it is only a very minor upgrade from C++11.

Maritimo 15 Junior Poster in Training

Definitivelly the most powerfull language of all times is...

English.

The most powerfull computer is an...

Engineer.

Explain your problem to an Engineer in English, and he/she will solve it!

Easy, isn't it?

Tcll commented: do you know what a computer is? +0