0% found this document useful (0 votes)
7 views1 page

Header File

Uploaded by

jt9720355
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views1 page

Header File

Uploaded by

jt9720355
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

The error you're seeing indicates that the `g++` compiler cannot find the files you

are trying to compile. This is likely because the terminal is still in the `C:\
Users\Ahmed` directory, while your code files are located in `D:\sublime text\
header`.

To resolve this, follow these steps:

1. **Change directory to where your files are located**:


You need to change the terminal’s current directory to `D:\sublime text\header`,
where your `.cpp` files are.

Run this command:


```bash
cd /d D:\sublime text\header
```
The `/d` flag allows switching between different drives (C: to D:).

2. **Check if your files are there**:


You can verify if the `.cpp` files are in the directory by using the `dir`
command on Windows:
```bash
dir
```
This should list the files in the `header` folder, including `ahmed_lutfi.cpp`
and `idk.cpp`.

3. **Compile the files**:


Once you are in the correct directory, run the `g++` command again:
```bash
g++ ahmed_lutfi.cpp idk.cpp -o myProgram
```

4. **Run the program**:


After successful compilation, run the program:
```bash
myProgram.exe
```

Let me know how it goes or if you run into any further issues!

You might also like