Cout Was Not Declared In This Scope C Code Example


Example 1: error: ‘cout’ was not declared in this scope

#include <iostream> using namespace std;  adding above two lines before main will help you  NOTE: note: suggested alternative: In file included from class.cpp:1:0: /usr/include/c++/7/iostream:61:18: note:   ‘std::cout’    extern ostream cout;  /// Linked to standard output                   ^~~~

Example 2: cout was not declared in this scope

#include<iostream> using namespace std; //use this int main(){     char t = 'f';     char *t1;     char **t2;     cout<<t;             return 0; }

Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable