User Profile

Collapse

Profile Sidebar

Collapse
clockworx05
clockworx05
Last Activity: Oct 12 '07, 08:53 PM
Joined: Sep 25 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • clockworx05
    started a topic Header File Problem
    in C

    Header File Problem

    :chomp: Hey guys i have an address book that needs to work. I have a header file, but my program says missing header file. here is my code for the program:

    Code:
    #include <iostream>
    #include "addressbook.h"
    using namespace std;
    
    
    struct PERSON
    {
    	char fName[25];
    	char lName[25];
    	char email[25];
    
    };
    
    PERSON addresses[MAXADDRESS]:
    ...
    See more | Go to post

  • clockworx05
    replied to Optimizing C++ Case Statement
    in C
    Ok i fixed it :)

    Thanks everyone for the help;


    Code:
    /*
    Write a function called foo that asks the user for their age. 
    Pass the age value to a function called showAge that uses a select case structure to print out the following: 
    If the age is 0-12 print out "You are still a child. If the age is 13 - 19 print out "You are a teenager. 
    If the age is 20 - 40 print "You
    ...
    See more | Go to post

    Leave a comment:


  • clockworx05
    replied to Optimizing C++ Case Statement
    in C
    the error is:

    uninitialized local variable 'x' used
    See more | Go to post

    Leave a comment:


  • clockworx05
    replied to Optimizing C++ Case Statement
    in C
    now when i do that to foo it says:

    variable "x" is being used without defined:

    /*
    Write a function called foo that asks the user for their age.
    Pass the age value to a function called showAge that uses a select case structure to print out the following:
    If the age is 0-12 print out "You are still a child. If the age is 13 - 19 print out "You are a teenager.
    If the age...
    See more | Go to post

    Leave a comment:


  • clockworx05
    replied to Optimizing C++ Case Statement
    in C
    ok here is my code now: Same error as above:

    Code:
    /*
    Write a function called foo that asks the user for their age. 
    Pass the age value to a function called showAge that uses a select case structure to print out the following: 
    If the age is 0-12 print out "You are still a child. If the age is 13 - 19 print out "You are a teenager. 
    If the age is 20 - 40 print "You are an adult" anything
    ...
    See more | Go to post

    Leave a comment:


  • clockworx05
    replied to Optimizing C++ Case Statement
    in C
    its inconsistant? or im not passing is correctly?
    See more | Go to post

    Leave a comment:


  • clockworx05
    replied to Optimizing C++ Case Statement
    in C
    i read that tutorial earlier today, i just get this one error that says:


    "error C2660: 'showAge' : function does not take 0 arguments"
    This is my code now:
    [Code=cpp]

    /*
    Write a function called foo that asks the user for their age.
    Pass the age value to a function called showAge that uses a select case structure to print out the following:
    ...
    See more | Go to post
    Last edited by sicarie; Sep 25 '07, 08:18 PM. Reason: Sorry, I hit 'edit' instead of reply - i'll fix it in a sec

    Leave a comment:


  • clockworx05
    replied to Optimizing C++ Case Statement
    in C
    i read that tutorial, i still dont understand.
    See more | Go to post

    Leave a comment:


  • clockworx05
    replied to Optimizing C++ Case Statement
    in C
    ok i guess im not aloud to do int x; in global, how would i pass X throughout?
    See more | Go to post

    Leave a comment:


  • clockworx05
    replied to Optimizing C++ Case Statement
    in C
    I GUESS I WILL DO THIS:


    Code:
    #include <iostream>
    using namespace std; 
    int foo ();
    
    int x;
    int showAge ();
    int main()
    {
    	
    	foo();
    	
    
    }
    int foo()
    {
    	cout << "Please Enter Your Age:" << endl;
    	cin >> x;
    	showAge();
    return x;
    }
    int showAge ()
    {
    ...
    See more | Go to post

    Leave a comment:


  • clockworx05
    started a topic Optimizing C++ Case Statement
    in C

    Optimizing C++ Case Statement

    Hey guys i have this program that i need to write for class. here are the instructions:

    Write a function called foo that asks the user for their age. Pass the age value to a function called showAge that uses a select case structure to print out the following: If the age is 0-12 print out "You are still a child. If the age is 13 - 19 print out "You are a teenager. If the age is 20 - 40 print "You are an adult" anything...
    See more | Go to post
No activity results to display
Show More
Working...