Search:

Type: Posts; User: sameintheend01

Search: Search took 0.01 seconds.

  1. Ok, it's almost there. On main.cpp, when the last...

    Ok, it's almost there. On main.cpp, when the last 3 functions are called, i get (it seems like) memory addresses --> when timePrint(t1), timePrint(t2), and timePrint(delta) are called.

    Also,...
  2. fixed that :-D bool timeRead(Time *t) ...

    fixed that :-D




    bool timeRead(Time *t)
    {
    cin>>time1;
    cout<<time1[2]<<endl<<time1[5];
  3. i tried using that code and it wouldn't work...i...

    i tried using that code and it wouldn't work...i guess i can't implement it correctly/i don't understand it.

    anyways, i found out that my code didn't work after all :(

    but, i made some new code...
  4. ack, finally. this is what i got for my function...

    ack, finally. this is what i got for my function




    bool timeRead(Time *t)
    {
    cin>>time1;
    if(time1[4] != 'A'||'a'||'p'||'P'||'n'||'N'||'m'||'M'){
    cin>>time2;
  5. inputting time in separate compilation

    Ok, for my program, we have to do separate compilation of 3 files: main.cpp, time.h, and time.cpp. We can only modify the time.cpp file. The part (well, actually the first part so far) that i'm...
  6. Replies
    7
    Views
    2,435

    code that compiles might help! ...

    code that compiles might help!







    #include<iostream>
    #include<fstream>
  7. Replies
    7
    Views
    2,435

    thanks again elad- i already got it to work...

    thanks again elad-

    i already got it to work before yor post though...sort of.

    I'm having trouble with my function that compares the inputted string (a city) to all the cities in the array. It...
  8. Replies
    7
    Views
    2,435

    elad- thanks for your help. what is the...

    elad- thanks for your help.

    what is the correct syntax to read in from a file and put it into an array?
  9. Replies
    7
    Views
    2,435

    The array is that large because that is the...

    The array is that large because that is the number of cities in the txt file. Wouldn't one array slot suffice for each city?
  10. Replies
    7
    Views
    2,435

    copying a string to an array

    hey, this is my problem/homework. A user inputs a city and state and the program searches a text file for the name. The latitude and longitude is given in the text file and the distance is...
  11. Replies
    1
    Views
    1,964

    what does static int mean?

    what does static int mean in this situtation:

    int x =42;

    void g(int y)
    {
    static int x=7;
    x+=y;
    }
  12. Replies
    1
    Views
    3,269

    minesweeper

    Ok, my wonderful teacher has assigned us to create a minesweeper type game. This is my problem. When a coordinate is inputted, instead of displaying the number of surrounding mines, it will display a...
  13. Replies
    1
    Views
    1,645

    Calender

    Ok, I'm sure everyone is sick of this one. I have to make a calender. Problem is that it has to be able to print from the year 0 until the year 10,000 so Zeller is no help for me. I think i am having...
  14. How to error check that input is int or something else

    Hi, here is my problem. I have to make a program that determines the distance between 2 points of latitude and longitude. I've done all that, but I'm having a problem with the error checking. The...
Results 1 to 14 of 14