0

So what I want to do is to have an actual image display (say like a jpeg) instead of those printf() lines to shorten up the code and have the pictures displayed in the output, and I would also like to know how to change the color of the text in the output so each picture can have a different color text message displayed with it. I'm using Visual Studio 2012 and 2013.

#include "stdafx.h"
#include "stdio.h"

int main(void)
{
    int var = 0;
    printf("Enter 1 or 2 or 3 to see the pictures in me: ");
    scanf_s("%i", &var);
    while (var > 0)
    {
        if (var == 1)
        {
            printf("  _____\n");
            printf("  |   |\n");
            printf("      |\n");
            printf("      |\n");
            printf("      |\n");
            printf("      |\n");
            printf("______|__\n");
            printf("Wana see more? ");
            scanf_s("%i", &var);
        }
        else if (var == 2)
        {
            printf("Be glad you didn't pick 1\n");
            printf("            (0_0)           \n");
            printf("^^Kirby is staring you down^^\n");
            printf("Hope you didnt piss him off!\n");
            printf("Wana see more? ");
            scanf_s("%i", &var);
        }
        else if (var == 3)
        {
            printf("So you decided to pick the safe route and not see either of the other two,\n");
            printf("But I will still force you to look!\n");
            printf("  _____\n");
            printf("  |   |\n");
            printf("      |\n");
            printf("      |\n");
            printf("      |\n");
            printf("      |\n");
            printf("______|__\n");
            printf("This is the end thank you for looking!\n");
            break;
        }
    }
    getchar();
    return 0;
}
David G
  • 94,763
  • 41
  • 167
  • 253
ChrisHoward
  • 65
  • 2
  • 3
  • 10
  • I can't understand your question. (BTW, "wanna" has two n's.) – ooga Nov 26 '14 at 00:50
  • Displaying images will be dependent upon which system you are targeting. Please edit your question and update it to let us know more. – Lee Taylor Nov 26 '14 at 00:50
  • I updated the question with a little more detail but I don't get how you don't understand the question? – ChrisHoward Nov 26 '14 at 00:56
  • To display an image, you'll need to write a GUI app, instead of your current console app. The details of this are far, far to great to be included in a Stack Overflow Q&A. I suggest you consult Google. – Jonathon Reinhart Nov 26 '14 at 01:03
  • Duplicate of: http://stackoverflow.com/questions/5450047/how-can-i-do-gui-programming-in-c – Jonathon Reinhart Nov 26 '14 at 01:03

0 Answers0