animation ascii art с++

Hello!
There was one problem I've got a header file and cpp file.
The header file contains the ascii art.
image.h

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//Images.h
#ifndef IMAGES_H_INCLUDED 
#define IMAGES_H_INCLUDED 

#include <iostream>
#include <string>
//Добавление пальмы
void addPalm(){
static char *Palm[] = {
	 " __.--..-._  ",
         "/  _/\____\ ",
         "|_/\_\_/ \_|",
         "    \_/     ",
         "    \_/     ",
         "    \_/     ",
	};
}
#endif //IMAGES_H_INCLUDED 



in main.cpp


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <iostream>
#include "images.h"
#include <string>
#include <stdio.h>


using namespace std;



int main(int argc, char* argv[])
{
        addPalm();
	system("pause");
	return 0;
}


subject does not appear, why?
Last edited on
you need to print it to the screen with ostream (std::cout)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef IMAGES_H_INCLUDED 
#define IMAGES_H_INCLUDED 

#include <iostream>
#include <string>
#include <stdio.h>
#include <windows.h>

void addPalm(){

       cout<<  " __.--..-._  ""<<endl;
       cout<<  "/  _/\____\ ""<<endl;
       cout<< "|_/\_\_/ \_|""<<endl;
       cout<<  "    \_/     ""<<endl;
       cout<<  "    \_/     ""<<endl;
       cout<<  "    \_/     ""<<endl;
}
#endif //IMAGES_H_INCLUDED


writes->
'endl' : undeclared identifier
'cout' : undeclared identifier
understood, blunted
and who knows how to do animation??
a) you dont need stdio.h
b) if you did need it i would use cstdio
c) you only really need one cout with a bunch of <<
d) your missing the std qualifier
e) you have triple quotes. remove one from each line
Topic archived. No new replies allowed.