-
-
Save CarterZenke/f9aa3a11b380694560b929d078b1cc94 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cs50.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
typedef struct node | |
{ | |
string phrase; | |
struct node *next; | |
} | |
node; | |
#define LIST_SIZE 2 | |
bool unload(node *list); | |
void visualizer(node *list); | |
int main(void) | |
{ | |
node *list = NULL; | |
// Add items to list | |
for (int i = 0; i < LIST_SIZE; i++) | |
{ | |
string phrase = get_string("Enter a new phrase: "); | |
// TODO: add phrase to new node in list | |
// Visualize list after adding a node. | |
visualizer(list); | |
} | |
// Free all memory used | |
if (!unload(list)) | |
{ | |
printf("Error freeing the list.\n"); | |
return 1; | |
} | |
printf("Freed the list.\n"); | |
return 0; | |
} | |
bool unload(node *list) | |
{ | |
// TODO: Free all allocated nodes | |
return false; | |
} | |
void visualizer(node *list) | |
{ | |
printf("\n+-- List Visualizer --+\n\n"); | |
while (list != NULL) | |
{ | |
printf("Location %p\nPhrase: \"%s\"\nNext: %p\n\n", list, list->phrase, list->next); | |
list = list->next; | |
} | |
printf("+---------------------+\n\n"); | |
} |
Thanks bro....
How to debug my code now ?!
hi how r u guys doing
when i tried to clone this file into cs50 codespace it says that I don't have permission to do so, is there any way to do that
when i tried to clone this file into cs50 codespace it says that I don't have permission to do so, is there any way to do that
just copy/paste it
this guy is a legend
thanks
W
Nicee
Thanks for this!
all good
great
Great
Thanks! ☺
...
great
Thank you very much. I'm so happy
Le mar. 6 août 2024 à 16:44, auguscab27 ***@***.***> a écrit :
… ***@***.**** commented on this gist.
------------------------------
great
—
Reply to this email directly, view it on GitHub
<https://gist.github.com/CarterZenke/f9aa3a11b380694560b929d078b1cc94#gistcomment-5145796>
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BIONUQRCGNIFDVEL7AID6ITZQD4ODBFKMF2HI4TJMJ2XIZLTSKBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDHNFZXJJDOMFWWLK3UNBZGKYLEL52HS4DFVRZXKYTKMVRXIX3UPFYGLK2HNFZXIQ3PNVWWK3TUUZ2G64DJMNZZDAVEOR4XAZNEM5UXG5FFOZQWY5LFVEYTCOBXGA3DOMBWU52HE2LHM5SXFJTDOJSWC5DF>
.
You are receiving this email because you commented on the thread.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>
.
Great stuff
ayo mistah white
How to properly download it at Codespace?
you have juste to copy the text inside the black board to a problem set
website. And then, past it in your terminal codespace. You have to do this
for evry element in a black board on th distribution code to a problem set
website
Le lun. 26 août 2024 à 06:26, J0n4ld ***@***.***> a écrit :
… ***@***.**** commented on this gist.
------------------------------
How to properly download it at Codespace?
—
Reply to this email directly, view it on GitHub
<https://gist.github.com/CarterZenke/f9aa3a11b380694560b929d078b1cc94#gistcomment-5167168>
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BIONUQTWT62PJLKH2JOSQGLZTLDDDBFKMF2HI4TJMJ2XIZLTSKBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDHNFZXJJDOMFWWLK3UNBZGKYLEL52HS4DFVRZXKYTKMVRXIX3UPFYGLK2HNFZXIQ3PNVWWK3TUUZ2G64DJMNZZDAVEOR4XAZNEM5UXG5FFOZQWY5LFVEYTCOBXGA3DOMBWU52HE2LHM5SXFJTDOJSWC5DF>
.
You are receiving this email because you commented on the thread.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>
.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Gj