Thread: how can i make graphs with C?

  1. #16
    Registered User
    Join Date
    Dec 2007
    Posts
    214
    If you don't understand what the professors are teaching go to their office after class and ask for clarification, or ask someone else from your class. Opening and reading, and re-reading the book is a great start. You're paying for college so you better get your money's worth.

  2. #17
    Dr Dipshi++ mike_g's Avatar
    Join Date
    Oct 2006
    Location
    On me hyperplane
    Posts
    1,218
    Err actually, now i remember better it was gcc that had compatibility problems with vista, not DevCpp itself. Compiling with g++ worked fine.

    Anchee: What functions is it that are not compatible with c++? Maybe you could find, or create your own alternatives. People here arent going to be able to help much unless you are more specific with your problem and/or post your code.

  3. #18
    Registered User
    Join Date
    Sep 2006
    Posts
    8,866
    Quote Originally Posted by anchee123 View Post
    i know im not doing it wrong.. it does not compile because some functions can't be read by cpp... get it master elysia?
    Of course you're doing something wrong - otherwise it would work.

    You are walking too proudly in the earth, my friend. Programming isn't about YOU, because you WILL make thousands of mistakes before you learn to program well, I promise.

    We all did.

    The advice you were given was excellent, but may not be relevant to you. For example, when I took my C class, the instructor told us which compiler was REQUIRED, period. Changing compiler's was not an option - neither was using a library that wasn't specified by the instructor.

    In the long run, you should indeed move to a more modern compiler and use libraries to simplify your programming, and improve the final product. To suggest that you can't draw a line or arc graph in Turbo C without special libraries is simply wrong, and:

    ** Run time is not an issue - the graph will be drawn in the blink of an eye
    ** The number of processors used is not an issue. One is plenty!
    ** The amount of memory available is not an issue - there's more than enough for a graph.

    Anchee, you need to post up all the details, an example of input for this, and what you've decided for your type of graph. Also, whatever code you have attempted, whether working or not.

  4. #19
    Registered User
    Join Date
    Dec 2007
    Posts
    9
    ok then here's the whole thing...
    1. Problem Statement
    Create a program which draws a given graph to the standard output using an ASCII character.
    2 .Overall Description
    AscGraph is short for ASCII Graphics Software. It is a command line executable program which
    draws graphs in the standard output of the console using printable ASCII characters.

    3 General Requirements
    3.1 Development Environment
    The program must be developed under Linux O.S. The IDE or editor can be any of your choice.
    3.2 Testing Environment
    The program will be tested under the following testing environment:
    Field Type: Environment / Version
    Operating System: Linux
    Distribution: Ubuntu
    Shell bash: (KDE konsole)
    gcc: 3.4

    4.1 Program name
    The name of the executable file for this program is:
    ascgraph
    The code shall compile successfully with –Wall –Werror gcc options.
    4.2 Program Syntax
    ./ascgraph
    4.3 External Interfaces
    The user is prompted with several questions. The first question must be to enter the graph type. The succeeding questions depend on the graph type entered by the user.

    .... the next thing will show the supported graphs..

  5. #20
    Registered User
    Join Date
    Dec 2007
    Posts
    9

    The Problem

    ok then here's the whole thing...
    1. Problem Statement
    Create a program which draws a given graph to the standard output using an ASCII character.
    2 .Overall Description
    AscGraph is short for ASCII Graphics Software. It is a command line executable program which
    draws graphs in the standard output of the console using printable ASCII characters.

    3 General Requirements
    3.1 Development Environment
    The program must be developed under Linux O.S. The IDE or editor can be any of your choice.
    3.2 Testing Environment
    The program will be tested under the following testing environment:
    Field Type: Environment / Version
    Operating System: Linux
    Distribution: Ubuntu
    Shell bash: (KDE konsole)
    gcc: 3.4

    4.1 Program name
    The name of the executable file for this program is:
    ascgraph
    The code shall compile successfully with –Wall –Werror gcc options.
    4.2 Program Syntax
    ./ascgraph
    4.3 External Interfaces
    The user is prompted with several questions. The first question must be to enter the graph type. The succeeding questions depend on the graph type entered by the user.

    .... the next post will show the supported graphs..

  6. #21
    Registered User
    Join Date
    Dec 2007
    Posts
    9
    here's the pdf...

  7. #22
    Registered User
    Join Date
    Dec 2007
    Posts
    9

    PDF of the PROBLEM

    pls open the pdf so you can help me out... sorry for the useless things i said in my previous posts... thank you... i just felt bad because still now i cant finish the machine problem...

  8. #23
    Registered User
    Join Date
    Dec 2007
    Posts
    2,675
    Quote Originally Posted by anchee123 View Post
    i use windows vista, im using the turbo c because some fcns can't be used in c++... i always get error when compiling in my devc++...
    And yet your assignment is to be done on the Linux platform using gcc.

  9. #24
    Registered User
    Join Date
    Sep 2006
    Posts
    8,866
    Quote Originally Posted by anchee123 View Post
    pls open the pdf so you can help me out... sorry for the useless things i said in my previous posts... thank you... i just felt bad because still now i cant finish the machine problem...
    Anchee, I've looked at the pdf, and it's not to be done in Turbo C, so drop Turbo C please, immediately!

    Do you have a gcc compiler? That's what you'll need (be sure it's the right version, too).

    Do you have any code at all yet? Post it up, working or not. This is much more than just coding a program. There is a flow chart to be done, and other paperwork as well.

    Put it into high gear now, Anchee, time is short.

  10. #25
    Registered User
    Join Date
    Dec 2007
    Posts
    9
    Quote Originally Posted by Adak View Post
    Anchee, I've looked at the pdf, and it's not to be done in Turbo C, so drop Turbo C please, immediately!

    Do you have a gcc compiler? That's what you'll need (be sure it's the right version, too).

    Do you have any code at all yet? Post it up, working or not. This is much more than just coding a program. There is a flow chart to be done, and other paperwork as well.

    Put it into high gear now, Anchee, time is short.

    i have a gcc compiler... here's my code but it still lacks alot... hope u can help me with this...

    Code:
    #include <stdio.h>
    #include <conio.h>
    #define LENGTH 80
    #define HEIGHT 20
    #define CHARACTER 'X'
    
    int main()
    {
    int x1, y1, x2, y2;
    system("CLS");
    
    printf("x1: ");
    scanf("%d", &x1);
    printf("y1: ");
    scanf("%d", &y1);
    printf("x2: ");
    scanf("%d", &x2);
    printf("y2: ");
    scanf("%d", &y2);
    system("CLS");
    
    gotoxy(x1,y1);
    printf("%c", CHARACTER);
    gotoxy(x2,y2);
    printf("%c", CHARACTER);
    
    
    }

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to make a Packet sniffer/filter?
    By shown in forum C++ Programming
    Replies: 2
    Last Post: 02-22-2009, 09:51 PM
  2. HELP!wanting to make full screen game windowed
    By rented in forum Game Programming
    Replies: 3
    Last Post: 06-11-2004, 04:19 AM
  3. make all rule
    By duffy in forum C Programming
    Replies: 9
    Last Post: 09-11-2003, 01:05 PM
  4. Question about atheists
    By gcn_zelda in forum A Brief History of Cprogramming.com
    Replies: 160
    Last Post: 08-11-2003, 11:50 AM
  5. Replies: 6
    Last Post: 04-20-2002, 06:35 PM