Jun 3, 2014 at 7:06am UTC
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 Jun 3, 2014 at 7:07am UTC
Jun 3, 2014 at 7:17am UTC
you need to print it to the screen with ostream (std::cout)
Jun 3, 2014 at 8:04am UTC
and who knows how to do animation??
Jun 3, 2014 at 8:24am UTC
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