Thread: structure addresses...arg!

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Sep 2004
    Posts
    153
    ok...I found out what was wrong...I created this new pointer to accept the function return:
    Code:
    time* p_trip;
    p_trip = sum(&day1, &day2);
    show_time(p_trip);
    Quick question...does this look like a reasonable solution? Obviously it works so it's A soluation...I was wondering if this isn't optimal...I'd hate to develop bad habits so early in my programming...-Chap

  2. #2
    Registered User
    Join Date
    Sep 2004
    Posts
    153
    interesting code Salem...now what would the * before the sum function do to that function call? I'm very curious...thanks for the reply by the way...-Chap

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem referencing structure elements by pointer
    By trillianjedi in forum C Programming
    Replies: 19
    Last Post: 06-13-2008, 05:46 PM
  2. Ranged numbers
    By Desolation in forum Game Programming
    Replies: 8
    Last Post: 07-25-2006, 10:02 PM
  3. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  4. Serial Communications in C
    By ExDigit in forum Windows Programming
    Replies: 7
    Last Post: 01-09-2002, 10:52 AM
  5. C structure within structure problem, need help
    By Unregistered in forum C Programming
    Replies: 5
    Last Post: 11-30-2001, 05:48 PM