Beginner stuff

This is a discussion on Beginner stuff within the C Programming forums, part of the General Programming Boards category; [B]Hey guys. I just started with C a few days ago and I can do a lot of basic stuff ...

  1. #1
    Registered User
    Join Date
    Nov 2007
    Posts
    1

    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:

    Code:
    #include <stdio.h>
    
    int main()
    {
    printf("Call of Duty 4 - Modern Warfare Weapons File Editor\n");
    printf("Base design by xXezekielXx from callofduty.filefront.com\n");
    printf("Modified for CoD4 by 94Sniper from Modsonline.com\n");
    printf(" \n");
    printf(" \n");
    printf("1. Load a weapon\n");
    	int a;
    	scanf("%d", &a);
    	if (a == 1)
    		{
    		printf("*EDITOR MENU*\n");
            printf("\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");
            printf("\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("weapontype\n");
                printf("weaponclass\n");
                printf("FIND ALL THE PARAMETERS!\n");
                }
    }
    }
    thanks for any help!
    94Sniper

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

    --
    Mats
    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
    Posts
    2,129
    text in code tags doesn't wrap. Try this to make your code more readable:
    Code:
    printf("lkdfjgldsfkjldsfkjgldskfjgdlkfg"
           "sdkfjghdskfjghsdkfjhsdkjfgh"
           "ksdfjhgksjdfhgksdjfhgksdjfhgk"
           "ksdfjhgskdfjhgskdjfh\n");
    
    /* insead of */
    
    printf("sldkfjghsdlfkjghsdlkjghsldkjfhglskdjfhglksdjhglskdjfhglskdjhfglksdjhglksdjhglkdsjhfglkdsj");

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, 12:48 PM
  2. What are some good beginner programs I shouold make?
    By oobootsy1 in forum C# Programming
    Replies: 6
    Last Post: 08-09-2005, 03:02 PM
  3. Windows programming for beginner (Absolute beginner)
    By WDT in forum Windows Programming
    Replies: 4
    Last Post: 01-06-2004, 11:21 AM
  4. Your stuff
    By smog890 in forum C Programming
    Replies: 6
    Last Post: 06-14-2002, 12:50 AM

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