How do I make card symbols?

This is a discussion on How do I make card symbols? within the C Programming forums, part of the General Programming Boards category; How do u make card symbols such as hearts, spades, clovers, and dimonds in C?...

  1. #1
    Unregistered
    Guest

    Question How do I make card symbols?

    How do u make card symbols such as hearts, spades, clovers, and dimonds in C?

  2. #2
    Registered User
    Join Date
    May 2002
    Posts
    8
    use the Decimal number that the symbol has, define the symbol, and then use the character

    for example, to print a line of Spades

    Code:
     /*#include <stdio.h>
    
    #define symbol 06
    
    main()
    {
    	int row;
    
    	for(row = 1; row <= 60; ++row)
    		printf("%c", symbol);
    
    }

  3. #3
    Unregistered
    Guest
    clovers? or clubs?

  4. #4
    Registered User
    Join Date
    May 2002
    Posts
    8
    find the ascii chart

  5. #5
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    The characters you refer to outside of the standard printable range, but none the less, are still generated on some DOS screens. If you are getting a spade for 6, you might find that 3, 4 and 5 are the other numbers you require.

    This is however a non-portable way of doing things, meaning you aren't guaranteed to see these characters on other platforms.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Makefile Problem: None rule to make target
    By chris24300 in forum Linux Programming
    Replies: 25
    Last Post: 06-17-2009, 10:45 AM
  2. Vector out of range program crash.
    By Shamino in forum C++ Programming
    Replies: 11
    Last Post: 01-18-2008, 05:37 PM
  3. Segmentation Fault - aaaaaaaah!
    By yogibear in forum C Programming
    Replies: 6
    Last Post: 10-01-2007, 04:21 AM
  4. Cribbage Game
    By PJYelton in forum Game Programming
    Replies: 14
    Last Post: 04-07-2003, 11:00 AM
  5. OpenGL .dll vs video card dll
    By Silvercord in forum Game Programming
    Replies: 14
    Last Post: 02-12-2003, 07:57 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21