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,...
Type: Posts; User: sameintheend01
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,...
fixed that :-D
bool timeRead(Time *t)
{
cin>>time1;
cout<<time1[2]<<endl<<time1[5];
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...
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;
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...
code that compiles might help!
#include<iostream>
#include<fstream>
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...
elad- thanks for your help.
what is the correct syntax to read in from a file and put it into an array?
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?
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...
what does static int mean in this situtation:
int x =42;
void g(int y)
{
static int x=7;
x+=y;
}
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...
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...
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...