V
V
vjufvufcgyf2020-08-23 21:07:03
C++ / C#
vjufvufcgyf, 2020-08-23 21:07:03

Is it possible to write in C++ with C inserts?

while not doing too complicated manipulations

Answer the question

In order to leave comments, you need to log in

2 answer(s)
1
15432, 2020-08-23
@vjufvufcgyf

Well yes, use extern :

extern "C" {
        //сишный код
        int g(double);
        double h();
        ....
    };

D
Daddy_Cool, 2020-08-27
@Daddy_Cool

So a generation of programmers was born for whom C and C++ are different languages. Dinosaurs see ++ as an addition to old C, in which the most useful thing is commenting with slashes //.
Seriously though, ask a question. All C ++ compilers compile pure C with a bang.
If you write cout in one line, and printf in the next line, the sky will not fall and the compiler will not scold, but it is unlikely that your question is so obvious, most likely something more complicated is meant .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question