I am not sure if this is the right way to open a picture file, however it is the only way I could find that I understood. The code works without errors but it is not displaying the picture what am I doing wrong?
CODE
// Dogpile Icon
/*This program opens a file. It uses
fclose to close the file.*/
#include <stdio.h>
#include <iostream>
using namespace std;
FILE *stream;
int main( void )
{
errno_t err;
// Open for read (will fail if file "dogpile icon" does not exist)
if( (err = fopen_s( &stream, "INSERT IMAGE LOCATION", "r" )) !=0 )
printf( "The file 'Dogpile Icon' was not opened\n" );
else
printf( "The file 'Dogpile Icon' was opened\n" );
// Close stream if it is not NULL
if( stream)
{
if ( fclose( stream ) )
{
printf( "The file 'Dogpile Icon' was not closed\n" );
}
}
cout << "\n\n\n\n\n\n\n\n\n\n\n\npress enter...";
cin.ignore(cin.rdbuf()->in_avail() +1);
}
What I'm ultimately trying to do is find a way to insert a picture as the title of the text based rpg I'm making (going to create in photoshop). If there is another way to display a picture please let me know, thank you.