Thread: Variables to create box

  1. #1
    Registered User hungrymouth's Avatar
    Join Date
    Oct 2012

    Variables to create box

    Hi um I'm not really sure what this means but this is an assignment for my programming class. The professor says to create a box where Row,Col,Color are variables. How does that work can someone explain to me?

  2. #2
    TEIAM - problem solved
    Join Date
    Apr 2012
    Melbourne Australia
    We can guess what is most likely. However, I would suggest that you go to them and be sure that you know what they want you to achieve.

    Have a piece of paper and draw down what the output of the program should be.
    Fact - Beethoven wrote his first symphony in C

  3. #3
    Registered User
    Join Date
    Sep 2006
    The char all have values - they are variables of a constant sort in your character set. The box drawing char's are the same way.

    If you don't have an ascii type table for your character set with the decimal values, you can download one from the net - was one such place, iirc. Anyway, Google it, and you'll find lots of sites for it. You can also print up your char set from your computer if you want to:

    #include <stdio.h>
    int main() {
       int i;
       for(i=1;i<256;i++) {
          printf("%3d: %c  ",i,i);
       return 0;
    The char's you need are in the extended section, above 127.

    These are some that I've used:
    #define VRT   186   //vertical bar
    #define HRZ2  205   //horizontal double bar
    #define HRZ1  196   //horizontal single bar
    #define TUP   202    //T with upward bar
    #define TDWN  203   //T with downward bar
    #define INTR  215    //intersection 
    #define LLCNR 200     //lower left corner
    #define LUCNR 201    //left upper corner
    #define RLCNR 188    //right lower corner
    #define RUCNR 187    //right upper corner
    #define LINTR 199     //left intersection -probably a T for the side
    #define RINTR 182     //right intersection - ditto
    There are char's for both single and double sided box figures. Your values may vary from these, by the way.

    Have fun!
    Last edited by Adak; 11-15-2012 at 08:11 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How can I create multiple variables in C?
    By superbbrr in forum C Programming
    Replies: 1
    Last Post: 10-31-2011, 03:43 PM
  2. can i create a treeview for my global variables?
    By metaldemon in forum Game Programming
    Replies: 1
    Last Post: 10-26-2011, 05:41 AM
  3. create and populate create bidimensional array
    By darkducke in forum C Programming
    Replies: 0
    Last Post: 12-03-2010, 07:06 AM
  4. Replies: 6
    Last Post: 12-02-2009, 08:47 AM
  5. Replies: 5
    Last Post: 12-09-2008, 02:18 PM