Check out example codes for "error: ‘cout’ was not declared in this scope". It will help you in understanding the concepts better.

Code Example 1

#include <iostream>
using namespace std;

adding above two lines before main will help you

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

Code Example 2

using namespace std; //use this
int main(){
    char t = 'f';
    char *t1;
    char **t2;
    return 0;

Learn ReactJs, React Native from