Click here to Skip to main content
14,599,199 members
Rate this:
Please Sign up or sign in to vote.
See more:
i write c++ on visual stduio code on linux mint
when i compile my program that,contains #include<stdio.h>
:
the compiler tells me
ApproximationOfpiMain.cpp:1:19: fatal error: studio.h: No such file or directory
 #include<studio.h>
                   ^
compilation terminated.

...

What I have tried:

there are red lines under #include<studio.h> that tells:
<pre>#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (/home/adam/Desktop/c++/ApproximationOfpiMain.cpp)
Posted
Updated 21-May-20 3:33am
Rate this:
Please Sign up or sign in to vote.

Solution 1

it is called stdio.h, NOT studio.h (I can hear the Gods Of Computer Programming crying...).
   
v2
Comments
AdamStuttgart 21-May-20 9:24am
   
thanx ,i started writing c++ and running linux 3 days ago,thenceforth i hear the Gods of Computer programming crying every day )))))))))
CPallini 21-May-20 9:29am
   
If you are learning C++ then don't use <stdio.h>.
See, for instance
http://www.cplusplus.com/doc/tutorial/basic_io/
Rate this:
Please Sign up or sign in to vote.

Solution 2

If you're writing C++ instead of C, you should #include <cstdio> rather than <stdio.h>.

But that header is for C strings, whereas <string>[^] is preferable in C++ and will interwork with C strings when necessary.
   
v3
Comments
CPallini 21-May-20 10:05am
   
That header is for C I/O.
Greg Utas 21-May-20 10:29am
   
Right! Not sure what I was thinking.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100