Search:

Type: Posts; User: wireless

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    3,592

    What if I have a year like 1992 or 2006?

    What if I have a year like 1992 or 2006?
  2. Replies
    4
    Views
    3,592

    Counting Number of days from year zero

    I have to write this function

    int totDay(int m, int d, int y);
    The function returns the total number of days for the given month, day and year from date zero. The teacher gave us a hint...
  3. Replies
    1
    Views
    977

    What does this error mean?

    Compiling...
    date1tst.cpp
    Linking...
    LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
    Debug/ass3.exe : fatal error LNK1120: 1 unresolved externals
    Error executing...
  4. Need help with something small - formatting problem

    I having a problem with my output, it is correct, my problem is a formatting thing.

    This is my output
    : January 1, 1
    d2(12,27,1992): December 27, 1992
    d3(0,99,10000): January 1, 1...
  5. Thread: function call

    by wireless
    Replies
    1
    Views
    799

    I did it like this void Date::setDate(int...

    I did it like this



    void Date::setDate(int m, int d, int y, const char *name)
    {
    theMonth = (m >= 1 && m <= 12) ? m : MM;
    theYear = (y >= 0 && y <= MAX_YY) ? y : YY;
    theDay = (d >= 1 && d...
  6. Thread: function call

    by wireless
    Replies
    1
    Views
    799

    function call

    this is my function protoype

    void setString(const char *str);

    i have to call it from another function
    its purpose is to to set a variale called *theName

    this is how i did it, but I am...
  7. Thread: constructor??

    by wireless
    Replies
    3
    Views
    1,018

    Or does anybody know where i can find good...

    Or does anybody know where i can find good notes/tutorials on class composition
  8. Thread: constructor??

    by wireless
    Replies
    3
    Views
    1,018

    constructor??

    i have two classes

    //Event class
    class Event
    {
    public:
    Event();
    Event(const Time & time, const char* name);
    Event(const Event & event);
    ~Event();
  9. constructor to set variable to an empry string

    I am a new to c++, I have to set the variable name to an empty string in the class constructor. This is the way i approached it, is this correct?

    class test
    {
    private:
    char* name;

    ...
  10. its for an assignment..which the requires the...

    its for an assignment..which the requires the function to be a const....using the variable name perimeter.
  11. function to calculate the Circumference of a circle

    here's my function

    double Circle::calcPerimeter() const
    {
    return perimeter = 2 * radius * 3.1425;
    }

    on visual c++ i get this error....

    error C2166: l-value specifies const object
  12. Thread: Constructors

    by wireless
    Replies
    6
    Views
    1,666

    I've been trying the suggestions from people on...

    I've been trying the suggestions from people on this board and i'm still having troubles...

    //Time.H

    #ifndef __TIME_H__
    #define __TIME_H__

    class Time
    {
    private:
  13. Thread: Constructors

    by wireless
    Replies
    6
    Views
    1,666

    The assignment calls for .... 1. Default...

    The assignment calls for ....

    1. Default constructor.Set time components to 00:00:00. Use member intialization list to set values.

    2. Constructor with 3 args, representing time components. If...
  14. Thread: Constructors

    by wireless
    Replies
    6
    Views
    1,666

    Constructors

    I am writing a time class. I have set the default constructor using member initialization list to set the values

    // Time .h

    Time(int hour = 0, int minute = 0, int second = 0);

    // Time.cpp
    ...
  15. Thread: Strings

    by wireless
    Replies
    1
    Views
    913

    Strings

    I am working on a string class, which asks the user for a string. I have a fixed length array size of 100. I have to ensure that the string length is less 100, if its greater than 100 it only...
  16. Replies
    1
    Views
    788

    string help again

    I have to ensure that a string entered by the user is all lowercase...

    here is the code...

    // String.cpp

    #include <iostream>
    #include <stdlib.h>
    #include <ctype.h>
    #include "string.h"
  17. C++ newbie..convert string from lowercase to uppercase

    i am wrting a small function that takes a string in lowercase then i want to change it to uppercase. How do i do that?
  18. Replies
    1
    Views
    843

    Newbie question

    I have to write a class called time, which has a set member function that takes no arguments which prompts the user to enter the time and assigns them to hour, minute and second. My question is if...
  19. Thread: Newbie HELP

    by wireless
    Replies
    1
    Views
    922

    Newbie HELP

    heres my code................

    // time.h

    #include <iostream>

    using std::cout;
    using std::cin;
    using std::endl;
  20. Replies
    2
    Views
    847

    newbie question help

    I am wriing a school assignment

    it asks the user to enter a char a short and an int...
    if for example you enter 43 1234 45455
    it accepts it as good input....how do i recject it if a user enters...
Results 1 to 20 of 20