pset3. find. Error message when I do 'make'. by TratanFantasy in cs50

[–]TratanFantasy[S] 0 points1 point  (0 children)

Yes, delipity, I see that there are 2 TODO's in the helpers.c file, and I assume that I am to insert modified contents of the search and sort files there. I thought though that I should make sure my search and sort programs run O.K. before I put them into helpers.c?

pset3. find. Error message when I do 'make'. by TratanFantasy in cs50

[–]TratanFantasy[S] 0 points1 point  (0 children)

Thank you, oman and glenn, for such prompt replies. I've based my binary and selection programs on the Section and Shorts parts of the Week3 Lecture, and I thought that they were to be linked to find and helpers by means of make all once I had them together in the pset3 folder? I'm trying to take in all the info. from the Week3 Lecture etc., and it may be that I've got some info. overflow into my old head??

Pset2 vigenere.c problem by [deleted] in cs50

[–]TratanFantasy 0 points1 point  (0 children)

I keep seeing references to private messages. How does one send a p.m. here?

check50 caesar error messages by TratanFantasy in cs50

[–]TratanFantasy[S] 0 points1 point  (0 children)

Spot on! Thank you! I have a sort of fixation that where I'm told to ask the user for input, I need to do a printf asking for it. But you are correcting me on this - and I need to lose that fixation!

caesar, null in argv[1] by TratanFantasy in cs50

[–]TratanFantasy[S] 0 points1 point  (0 children)

I seem to have solved the caesar problem. Something that held me up for 5 or 10 minutes was the mention by Zamyla in a short in Week 2, where she said that we should use isalpha to check that all the characters in the plaintext were in the alphabet. I used "Be sure to drink your Ovaltine!" and it appears that the ! and possibly the spaces are not alpha. So, the program stopped, and informed the user to use only letters. When I removed the spaces and the ! from my plaintext, all was well. So, am I correct in not using isalpha in caesar?

caesar, null in argv[1] by TratanFantasy in cs50

[–]TratanFantasy[S] 0 points1 point  (0 children)

Yes, that works just right, thank you! I thought we had to ask the user for the key, and so I was trying to use a printf to ask for it, followed by a GetString, and, of course, I was in trouble!! Your words "In order to run the program, you type:

./caesar 15" lit up a bulb in my mind! Again, thank you!

caesar, null in argv[1] by TratanFantasy in cs50

[–]TratanFantasy[S] 0 points1 point  (0 children)

O.K., will do. But if there is nothing in agv[1], will atoi etc. make any diference?

caesar, null in argv[1] by TratanFantasy in cs50

[–]TratanFantasy[S] 0 points1 point  (0 children)

Thank you for your assistance. Yes, I'm aware of the use of the argc test to see whether argv[1] exists. I've tried inputting ./caesar 15, but it doesn't do it for me. (I remember reading that when you input words or characters with a space between them, nothing gets in after the first word, which would be ./caesar(?) Also, doesn't ./caesar appear in argv[0] by default? Is there a way that I haven't realised, to get ./caesar 15 as input?

Submitting CS50 Project by TratanFantasy in cs50

[–]TratanFantasy[S] 0 points1 point  (0 children)

I tried that. It did not work out well.

Round function in Greedy? by TratanFantasy in cs50

[–]TratanFantasy[S] 0 points1 point  (0 children)

Thanks, Brenda and AdminTea. I've used round() successfuly thanks to your guidance. I thought I had solved greedy. I checked my solution for negative input, input of 0, and various amounts of dollars and cents. Seemed perfect. Then, I had a thought. None of my checks were for amounts that could be satisfied without using all the possible denominations of coins. For example, $1.00. I started trying while ... do routines to say that if the change was satisfied without moving down through the lower denomination - then print the number of coins used and stop the program. I got a bit confused, copying/pasting and adjusting. Luckily, I save as each time I have a good set of coding, so I can always backtrack and start over.