Jump to content

C++ error Messages

Go to solution Solved by Mr_KoKa,

try to #incluide <string>

I have been trying to display text from a file into the console in C++, but the I'm getting the following errors:

(These are the header files that I used:

#include "stdafx.h"
#include <iostream>
#include <math.h>
#include <cstring>
#include <cstdlib>
#include <process.h>
#include <fstream>)

Untitled.png

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Mr_KoKa said:

try to #incluide <string>

Thanks! It works fine now!

Link to comment
Share on other sites

Link to post
Share on other sites

While you're learning and using small programs, I'd like to suggest using the Godbolt compiler viewer and use Clang 3.9. You actually get helpful error messages that would point out you're missing the string header. :)

 

https://godbolt.org

Software Engineer for Suncorp (Australia), Computer Tech Enthusiast, Miami University Graduate, Nerd

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×