How to identify the Private Address Ranges

The Internet Assigned Numbers Authority (IANA) has assigned several address ranges to be used by private networks.

Address ranges to be use by private networks are:

  • Class A : 10.0.0.0 to 10.255.255.255
  • Class B : 172.16.0.0 to 172.31.255.255
  • Class C : 192.168.0.0 to 192.168.255.255

I hope you will find this topic useful.

[mai mult...]

Upgrade windows 11 to unsupported hardware

  1. First of all you need to download from microsoft.com the win 10 iso file.
  2. Second you create a folder named  “Windows 11 install” on your desktop
  3. Then you download from microsoft.com the win 11 iso file.
  4. Then you need to mount the windows 10  iso file and copy all the files to the folder that you created on desktop.
  5. Then you mount the win 11 iso file.
  6. In the “sources” subfolder you will find a file called “install.wim”
  7. you need to copy that file to the same location but on your “windows 11 install” folder that you created on your desktop.
  8. Then you open again the “Windows 11 install” folder and click on the “install” tab and you’re good to go.
[mai mult...]

How to read data from files with C++

  1. Include the fstream header file with using std::ifstream;
  2. Declare a variable of type ifstream
  3. Open the file
  4. Check for an open file error
  5. Read from the file
  6. After each read, check for end-of-file using the eof() member function.

Example:

#include <iostream>
using std::cerr;
using std::cout;
using std::endl;
#include <fstream>
using std::ifstream;
#include <cstdlib> // for exit function
// This program reads values from the file 'example.dat'
// and echoes them to the display until a negative value
// is read.
int main()
{
   ifstream indata; // indata is like cin
   int num; // variable for input value
indata.open("example.dat"); // opens the file
   if(!indata) { // file couldn't be opened
      cerr << "Error: file could not be opened" << endl;
      exit(1);
   }
indata >> num;
   while ( !indata.eof() ) { // keep reading until end-of-file
      cout << "The next number is " << num << endl;
      indata >> num; // sets EOF flag if no value found
   }
   indata.close();
   cout << "End-of-file reached.." << endl;
   return 0;
}
[mai mult...]