Hi Vart,
Many thanks for your reply.
Well, it prompts for the data to be entered ok and I can enter it but it's after that part that I'm having trouble trying to calculate it. Does it need to...
Type: Posts; User: hello_moto
Hi Vart,
Many thanks for your reply.
Well, it prompts for the data to be entered ok and I can enter it but it's after that part that I'm having trouble trying to calculate it. Does it need to...
Still can't get it to work - anyone any ideas on the above ?
Thinking of stopping this one and starting another one as I can't get this working, would hate to do that though ! :)
Thanks
H_M
Hi vart,
Thanks very much for your input on this subject. Yes, I do wish to do all the above, converting, calculating and then format it back into a string. I am not using seconds though, don't...
Hi vart,
Thank you for your reply.
That sounds pretty good - how would I go about doing that ? I'm not sure how I could do that.
Any help will be greatly appreciated.
Thanks
Hey guys,
Yeah - I am trying to get the time taken between destination and arrival but think I may have been going about it the total wrong way ?
I was trying to get the user to enter the times...
Thanks Zuk - it can't be done with the way I'm doing it, that clears it up a bit more for me.
I'm just having a look now for 'atoi()' and I'm going to try that, see how I get on.
Many thanks !...
Vart,
I tried your code example but still cannot get the 'strcpy' to work. :o(
Using your code I can get it to work, but as soon as I start changing it to take either of my inputs, it fails...
Thanks. I think my code might actually be a mixture of C and C++ although it started off as C!
It'll need to be tomorrow I look at it now, have to go out now with my mum. Will let you know how I...
Thanks mate - that looks quite good! I'm going to try and work that into my code as mines differs slightly as I'm using 'cout' rather than 'printf' and I want to get the total into another string so...
I know this will sound really stupid, but how would I do that ?? I thought I was passing the two of them as 'char' ?
I am trying to work my way around it by using an old book that a friend passed...
Ah, I see, that makes sense to me now.
The code of my struct is:
struct travel_record_type
{
char member_name[MEMBER_NAME_SIZE+1];
char member_phone[MEMBER_PHONE_SIZE+1];
char...
I thought it was compiling as 'C' !? You'll have to forgive me on a couple of things, I am a beginner at this and just working my way through it.
The struct 'travels' contains all the data that is...
Hi all,
I'm trying to compile my program and I keep getting the error message
error C2664: 'strcpy' : cannot convert parameter 2 from 'char' to 'const char *'
Conversion from integral...
Cheers guys for the info on 'getline' - I'm trying to look into it but it's quite hard for me ! How would i go about using that in the code I pasted in my earlier post instead of 'gets' ??
If I...
Thanks guys. Yeah, I had forgotten to include the 'stdio.h' header ! Always the simplest things. :p
Sorry for using 'gets'. I've not been learning C++ long and the book I was/am using has 'gets'...
Hi guys,
I keep trying to compile the code of a small program that I have been creating just as a learning exerciser again but keep coming up against an error - "error C2065: 'gets' : undeclared...
Hi,
Thanks for your reply, it's much appreciated. :)
I am just really learning C++ so thought that gets would be the best to use - what's wrong with it can I ask ??
I have changed the size...
Hi guys,
I'm having another wee problem with a wee program that I'm trying to create. I managed to get the 'Validation' working so that it would reject an input that wasn't equal to five chars,...
Hi guys,
Just want to say thanks for all your help with this. I started again using the examples on here, done a couple of tweaks to make it suit my own program and it is working fine ! Even have...
Hi 7stud,
Again, thanks for all your help with this ! I'm still having the same problem trying to get the strlen() function to work with my program, but think I will get there in the end,...
Hi 7stud,
Once again, thank you very much for your reply and help on this. :)
I've changed it a bit now and have been using strlen and, I can get the error message to appear, but, it doesn't...
7stud, thank you for such a speedy reply - much appreciated ! ;)
I decided on using your second post as a guide, as that looked like the easiest for me to use, and I amended it slightly to fit...
Hi folks,
Nice to be on this forum. :)
I'm kinda new to C++ and have been working my way through a few on-line tutorials and have bought myself an idiots guide book but have come to a halt...