Thread: Homework HELP - Problem Printing to file

  1. #1
    Registered User
    Join Date
    Apr 2005
    Posts
    2

    Homework HELP - Problem Printing to file

    We have a homework problem that requires us to compare two files and combine data from both in order to make a third file. I am having trouble printing multiple lines of data to the third file. You can find the project description at the following website:

    http://www.brentshreve.com

    You can look at my code through this link:

    http://www.brentshreve.com/test.c

    You will need these files in your local directory to properly execute my code:

    http://www.brentshreve.com/exam.txt
    http://www.brentshreve.com/webCT.txt


    Thank you for your time in responding. You can e-mail me at [email protected] or call me at (765) 490-9644 if you're nice enough ) This project is due at 11pm CST tonight. Any help would be GREATLY appreciated!

  2. #2
    VA National Guard The Brain's Avatar
    Join Date
    May 2004
    Location
    Manassas, VA USA
    Posts
    903
    Is this the programmer for hire forum..?
    • "Problem Solving C++, The Object of Programming" -Walter Savitch
    • "Data Structures and Other Objects using C++" -Walter Savitch
    • "Assembly Language for Intel-Based Computers" -Kip Irvine
    • "Programming Windows, 5th edition" -Charles Petzold
    • "Visual C++ MFC Programming by Example" -John E. Swanke
    • "Network Programming Windows" -Jones/Ohlund
    • "Sams Teach Yourself Game Programming in 24 Hours" -Michael Morrison
    • "Mathmatics for 3D Game Programming & Computer Graphics" -Eric Lengyel

  3. #3
    Registered User
    Join Date
    Apr 2005
    Posts
    2
    No, I only have one problem with a little part of the project, but it's preventing me from doing the rest of the project.

  4. #4
    Registered User
    Join Date
    Oct 2001
    Posts
    2,934
    > if (userid2 == userid)
    Use strcmp() or strncmp() to compare strings:
    if (strcmp(userid2, userid) == 0) /* Strings are equal */

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    > This project is due at 11pm CST tonight
    Try www.cprog-tardis.com or www.cprog-miracles.com then. Quite what you expect anyone else to do about it with about 4 hours to go is beyond me. Maybe a course in basic time managment would be a good idea, because if you can't manage that, coding is not for you.

    > * You MUST use the special sorting algorithm described in lecture (CS 156/158 4/6, CS 190E 4/8)
    Dang it, I knew I was supposed to be somewhere, but I missed that lecture

    > o To use malloc you will need to include malloc.h
    Oh you poor soul, you're learning from someone who doesn't know C either (now how often do we see that here!)
    Try stdlib.h

    > Is there a sample program?
    > Yes! Here it is: ~cs158/projects/spring/pa4/runpa4, copy this file to your account and run it from there with your files!
    > Your program should function in the same manner as our program.
    > Please let us know if we made any mistakes!
    Oh man, I was SO looking forward to reading that - just to see how badly your tutors are at coding in C. If it's anything like the usual benchmark, 10% of the lines are incorrect in some way.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  6. #6
    Registered User
    Join Date
    Feb 2005
    Posts
    26
    Quote Originally Posted by Salem
    > * You MUST use the special sorting algorithm described in lecture (CS 156/158 4/6, CS 190E 4/8)
    Dang it, I knew I was supposed to be somewhere, but I missed that lecture
    I heard they used Merge Sort. At least that's what I'm told, I pay someone to go to the lectures for me.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Newbie homework help
    By fossage in forum C Programming
    Replies: 3
    Last Post: 04-30-2009, 04:27 PM
  2. Data Structure Eror
    By prominababy in forum C Programming
    Replies: 3
    Last Post: 01-06-2009, 09:35 AM
  3. Subtle(?) File I/O Problem
    By cecomp64 in forum C Programming
    Replies: 9
    Last Post: 07-16-2008, 11:39 AM
  4. Inventory records
    By jsbeckton in forum C Programming
    Replies: 23
    Last Post: 06-28-2007, 04:14 AM
  5. Replies: 3
    Last Post: 03-04-2005, 02:46 PM