Search:

Type: Posts; User: justdoit22

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    1,862

    Recusive strcpy

    Need help in Recusion


    char* StrCpy(char* output, char* input)
    {

    if (*input != NULL)
    {
    *output = *input;
    *output++;
  2. Replies
    13
    Views
    2,691

    ya it now looks right i previously tried to...

    ya it now looks right

    i previously tried to const getCount by trying these two options



    int const getCount() { return count; }
    const int getCount(){ return count; }

    but both didnt work
  3. Replies
    13
    Views
    2,691

    OK you advised to use this bool operator

    OK you advised to use this


    bool operator < (const MyString& left , const MyString& right)
    {
    return (left.getCount()) < (right.getCount());
    }

    but it doesnt compile in VC++6.0 errors are:...
  4. Replies
    7
    Views
    2,426

    replace for(a =1; a

    replace
    for(a =1; a<x;a++)

    with this one

    for(a =1; a<x-1;a++)


    wont give any logical errors more
    ------------------
  5. Replies
    13
    Views
    2,691

    Ok what i did at the end of the day was that i...

    Ok what i did at the end of the day was that i provided getter for MyString::count
    and defined a Global comparison operator as this



    bool operator < (MyString left , MyString right)
    {...
  6. Replies
    13
    Views
    2,691

    can some one tell me how shall i impelement the...

    can some one tell me how shall i impelement the predicate function which copares two classes before sorting????
  7. Replies
    13
    Views
    2,691

    Problem: std::sort() function use

    i have a class MyStrVec which contains a vector of class MyString.
    i want to use the std::sort function on that vector and wanna sort all vector members by the int count variable in MyString class....
  8. Replies
    4
    Views
    1,281

    replace this line cout

    replace this line
    cout << card;

    with this line

    cout<<card.c_str();

    i hope it will work fine now
  9. yeah it works fine with subdene solution.... i...

    yeah it works fine with subdene solution.... i actually had another bug in my original complete program
    thanx all ppl
  10. ok i tried this and thsi isnt working too...

    ok i tried this and thsi isnt working too
    neither in VC++ nor on Solaris GNU compiler


    class Schedule
    {
    public:
    Schedule()
    {cout<<"In Daily ctor"<<endl;};...
  11. ignore this line at the end...

    ignore this line at the end
    newdaily[dailyCounter].printSchedule;

    and cosider this correct
    newdaily[i].printSchedule();
  12. problem: cant acess class methods using vectors

    now i have a class Schedule.


    class Schedule
    {
    public:
    Schedule(int &dailyCounter)
    { cout<<"In Daily ctor"<<endl;
    dailyCounter++;
    };
  13. Replies
    8
    Views
    2,265

    i had to include these files in Event.h and now...

    i had to include these files in Event.h
    and now my very first declaration of Event works fine....

    #include <string>
    #include "Time.h"
    #include "Date.h"


    i had to include those files so that...
  14. Replies
    8
    Views
    2,265

    ok i put STATIC in front of a DATE and TIME...

    ok i put STATIC in front of a DATE and TIME member as belo
    in Event.h


    #ifndef _EVENT_H_
    #define _EVENT_H_

    class Time;
    class Date;
  15. Replies
    8
    Views
    2,265

    ok just tell me that have i declred the class...

    ok just tell me that have i declred the class Event correctly or not (assumung Date and Time are present in their .h and .cc files)??
  16. Replies
    8
    Views
    2,265

    Class with members as classes

    hey ppl ive got a little problem here...



    #ifndef _EVENT_H_
    #define _EVENT_H_

    class Time;
    class Date;
  17. Replies
    2
    Views
    1,128

    thanx man it works.... wondering i couldnt think...

    thanx man it works....
    wondering i couldnt think of it earlier.. perhaps new @ programming
    thanx again
  18. Replies
    2
    Views
    1,128

    validate userinput

    Hello ppl
    im trying to get user input using getline. i give this statement

    while (true)
    {
    if (!getline(cin, string, '/'))
    {
    cout<<"invalid input"<<endl;
    continue;
Results 1 to 18 of 18