POLL! What was your first C project?

This is a discussion on POLL! What was your first C project? within the C Programming forums, part of the General Programming Boards category; What was your first C project? Please explain it well or even postit here (oh ya and don't tell me ...

  1. #1
    Registered User
    Join Date
    May 2002
    Posts
    3

    Post POLL! What was your first C project?

    What was your first C project? Please explain it well or even postit here (oh ya and don't tell me any of this "Hello World" stuff...I mean your first good project!

  2. #2
    Comment your source code! Lynux-Penguin's Avatar
    Join Date
    Apr 2002
    Posts
    533
    my all too famous (among unix users)
    encrypt
    Code:
    /*
     * encrypt.c
     * encrypt: a program to encrypt a string using MD5
     * compile:
     * 	gcc encrypt.c -o encrypt -lcrypt
     * execution:
     * 	encrypt [key]
     * 
        Copyright (C) 2002  Lucas Campbell
    
        This program is free software; you can redistribute it and/or modify
        it under the terms of the GNU General Public License as published by
        the Free Software Foundation; either version 2 of the License, or
        (at your option) any later version.
    
        This program is distributed in the hope that it will be useful,
        but WITHOUT ANY WARRANTY; without even the implied warranty of
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        GNU General Public License for more details.
    
        You should have received a copy of the GNU General Public License
        along with this program; if not, write to the Free Software
        Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    
        License may be found at http://cyber.homeunix.net/linux/gpl.txt
     */
    
    #include <stdio.h>
    int main(int argc, char* argv[])
    {
    	if(argv[1] != NULL)
    	{
    		printf("%s\n",argv[1]);
    		printf("%s\n",crypt(argv[1],"$1$Lorraine"));
    	}
    	else
    	{
    		printf("Usage: encrypt [key]\n");
    	}
    	return 0;
    }
    basic as hell but also USEFULL as hell!
    Lorraine is the salt (name of girl I liked)
    it may be changed to your liking, working on new one in which salts are random or inputted by user.
    Currently finishing Steve project and NetSteve
    Asking the right question is sometimes more important than knowing the answer.
    Please read the FAQ
    C Reference Card (A MUST!)
    Pointers and Memory
    The Essentials
    CString lib

  3. #3
    eat my shorts!
    Join Date
    Apr 2002
    Posts
    294
    ofcourse "hello world"
    all great programmers start with "hello world"
    so y not

  4. #4
    Comment your source code! Lynux-Penguin's Avatar
    Join Date
    Apr 2002
    Posts
    533
    well, i think he means something you can call your "own" and has a TRUE purpose to serve something or someone.
    Asking the right question is sometimes more important than knowing the answer.
    Please read the FAQ
    C Reference Card (A MUST!)
    Pointers and Memory
    The Essentials
    CString lib

  5. #5
    Unleashed
    Join Date
    Sep 2001
    Posts
    1,765
    A combination of lots of different things. I have a stand alone hard drive with lots of emulation related things on it and 3 C programs written by me. One being Install. It uses a self-tinkered CopyFile function to do the file transfering. Then Remove.exe which simply removes everything copied by Install.exe. Finally Menu.exe which is a selection menu for all emulators not offering a GUI ( on a major scale ). This stand-alone hard drive can be hooked into any PC in which after doing so you run Install.exe. Install copies everything to the C: drive in a rightfully titled folder emulation. It copies with neat directory structure and sets up Menu.exe for use and notifies the user of Remove.exe.

    One thing sets it all up ready to go. The directory structure and associated files are also arranged so new emulators, and roms may be added into the setup very easily.

    It's sort of a "modular" storage device. It's most definately a WIP.
    The world is waiting. I must leave you now.

  6. #6
    Registered User stautze's Avatar
    Join Date
    Apr 2002
    Posts
    195
    I am still trying to compile it.

  7. #7
    Registered User
    Join Date
    Apr 2002
    Posts
    200
    basic as hell but also USEFULL as hell!
    Ummm...isnt the crypt function available from the cmdline on most nixes?

  8. #8
    Has a Masters in B.S.
    Join Date
    Aug 2001
    Posts
    2,267
    my first finished real code project was a fight with a goblin... started before i knew how to use functions or anything about a few weeks into progamming, i eventually completed it with the use of one function and things i learned as i went along, the code is a mess and i'd be embarassed to post it.
    ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.

  9. #9
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708

    ... the code is a mess and i'd be embarassed to post it.
    ...now ain't THAT the God's honest truth!! I still get a kick reading my old code. My first real attempt at a program was one that allowed the user to choose an element and let the program find the most probable atomical matches. It was cool to type in: "Oxygen" and see that old black box spit out: "Found O-H-H" (water!). I was so proud of myself!
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. CBoard Community Project: Poll #1
    By brewbuck in forum Projects and Job Recruitment
    Replies: 148
    Last Post: 06-10-2009, 01:04 PM
  2. Problem Displaying a Struct
    By rockstarpirate in forum C++ Programming
    Replies: 16
    Last Post: 05-05-2008, 10:05 AM
  3. Dynamic Binding
    By gpr1me in forum C++ Programming
    Replies: 1
    Last Post: 03-24-2006, 09:01 AM
  4. Game Independent Anti-cheat Project Needs Programmers
    By GIA Project Lea in forum Projects and Job Recruitment
    Replies: 3
    Last Post: 09-15-2005, 08:41 PM

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