Thread: Beginner stuff

  1. #1
    Registered User
    Join Date
    Nov 2007

    Talking Beginner stuff

    [B]Hey guys. I just started with C a few days ago and I can do a lot of basic stuff (printf, scanf, if , stuff like that) but, I'm trying to make a simple Console window program that can get data from a file by using a database to see if the file has the words that are in the database, and if so, display them. It's really more of an archive editing program. but what I cant do is:

    1. Figure out a way to do the whole database thing

    2. How to delete some of the above text. here's the code:

    #include <stdio.h>
    int main()
    printf("Call of Duty 4 - Modern Warfare Weapons File Editor\n");
    printf("Base design by xXezekielXx from\n");
    printf("Modified for CoD4 by 94Sniper from\n");
    printf(" \n");
    printf(" \n");
    printf("1. Load a weapon\n");
    	int a;
    	scanf("%d", &a);
    	if (a == 1)
    		printf("*EDITOR MENU*\n");
    		printf("This is a newer version of the original CoD WFE. Much has been changed from the original program. In this new program, you no longer have to find the name of the weapon file you wish to load! Simply type the name of the weapon below and in the second place, type whether it is Single-Player |type in S| or if the weapon is for multiplayer |type in M|.\n");
            int b, c;
            printf("Weapon:\n"); scanf("%d", &b);
            printf("SP/MP\n"); scanf("%d", &c);
            if (b == 1, c == 2);
                printf("Parameter Window: Parameters are the data files that you change. Type in a parameter to change.\n");
                printf(" \n");
                int d;
                printf("Parameter: \n"); scanf("%d", &d);
                printf(" \n");
                printf(" \n");
                printf("-- Parameters --\n");
                printf("FIND ALL THE PARAMETERS!\n");
    thanks for any help!

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Farncombe, Surrey, England
    Can you clarify what your actual questions are?

    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Registered User
    Join Date
    Oct 2001
    text in code tags doesn't wrap. Try this to make your code more readable:
    /* insead of */

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Same old beginner question...
    By Sharmz in forum C Programming
    Replies: 15
    Last Post: 08-04-2008, 11:48 AM
  2. What are some good beginner programs I shouold make?
    By oobootsy1 in forum C# Programming
    Replies: 6
    Last Post: 08-09-2005, 02:02 PM
  3. Windows programming for beginner (Absolute beginner)
    By WDT in forum Windows Programming
    Replies: 4
    Last Post: 01-06-2004, 10:21 AM
  4. Your stuff
    By smog890 in forum C Programming
    Replies: 6
    Last Post: 06-13-2002, 11:50 PM