Silverfrost Forums

Welcome to our forums

C++ query

1 Feb 2025 9:33 #31889

Hello

I primarily code in Fortran, but just out of interest I wanted to try the C++ compiler (SCC) via command line and Plato, but cannot get it to work using the easy code below:

// Your First C++ Program

#include <iostream>

int main() {
    std::cout << 'Hello World!';
    return 0;
}

It returns a compile error:

Compiling and linking file hw1.cpp using SCC.
C:\TEMP\HW1.CPP(3) : fatal 4 - Include file iostream cannot be opened
*** Compilation failed
Compilation or linking failed.

The include files sit under FTN95 and Fortran has no issues looking for MOD files there

....Silverfrost\FTN95\include

I am sure it is something simple! A basic query I know.

SCC version 4.61, Plato 6.01

Thanks

Lester

1 Feb 2025 9:59 #31890

Some changes are required for Win32 whilst iostream is not currently supported for x64.

#include <iostream.h>

int main() {
    cout << 'Hello World!';
    return 0;
}
1 Feb 2025 11:55 #31891

Thanks for the information Paul, got things working.

Please login to reply.