Skip to content

Latest commit

 

History

History
23 lines (14 loc) · 513 Bytes

File metadata and controls

23 lines (14 loc) · 513 Bytes

Modules in C++

I'm using G++ 13 on OpenSuse, this's my version. Make sure you've the same version or above.

gcc_version

First of all, compile iostream to a module.

g++ -fmodules-ts -x c++-system-header iostream  

If you see this folder, everything worked!

image_of_folder

Now, you can use the code here! Just run:

g++ -fmodules-ts sum.cpp main.cpp -o sum && ./sum

If you see the number 3 in your terminal, everything worked!