as usual, you explained with your heart, so all you demonstrated stayed vivid in my mind. thank you
@Sword001SK3 жыл бұрын
I am so glad that I found you. Thanks for making these C lecturing videos!
@diogenes_of_sinope11 ай бұрын
Thank you very much for your efforts and sharing the knowledge, you are a good person and you will be rewarded for the enlightenment of people.
@akhilpandey15399 ай бұрын
Don't stop making such videos please
@tynanmcgrady26244 жыл бұрын
brilliant explanation , thank you!
@Jorgeee4 жыл бұрын
Hey man, will you ever upload c++ tutorials? You explain everything so amazingly it's very easy to follow. You would make the c++ syntax so much easier to understand
@CodeVault4 жыл бұрын
Possibly, if enough people want me to. For now, I've got a lot planned for C programming tutorials and other computer science related topics which I found many people lack knowledge in.
@abdurezzaq7582 жыл бұрын
Thank you for this amaizing explanation!❤
@ignabelitzky4 жыл бұрын
Hey man... your vids are amazing!!! You deserve more subscribers!!!
@oliverondrus14702 жыл бұрын
You just saved my ass right here , Thank youuu.
@hey-its-me2392 жыл бұрын
THANK YOU SO MUCH FOR SAVING MY LIFE AND PROJECT! IT WORKED YEAHHH❤
@yusefalimam1303 жыл бұрын
excellent presentation, ill be checking this channel out for sure!!!
@anjalibhatt564 жыл бұрын
I'll start this series once I'm done with basic... Thank you 👌
@chillydoog4 жыл бұрын
Ok. Sounds good!
@zaabimahdi4 жыл бұрын
@CodeVault! Hey where are you ! C community miss your videos on youtube !
@admirmehmedovic43082 жыл бұрын
This helped me a lot, thanks;
@relaxingweathersoundsrainy11384 жыл бұрын
There are five data (plain text) files, namely, the “students.txt”, “courses.txt”, “registrations.txt”, “criteria.txt”, and “performances.txt” that keep information. Student file keeps the information about students such as the student number, name, surname, and department in abbreviated form. Course file keeps the information about courses such as the course code and course title. Criteria file keeps the information about course assessments such as the course code, course credit value, homework, lab, quiz, midterm, and final percentages. Registration file keeps the information about the student’s registrations such as the student number, academic year, semester, and course code. Performance file keeps the information about the student’s performances such as the student number, course code, and performances. The program should read all given files and should prepare transcripts for each student i am managed to read all files into structures but i am failing to match and collect information for each student @CodeVault please help
@CodeVault4 жыл бұрын
Head on over to our discord server (link in the description) and you can ask there in more details what your issue is.
@relaxingweathersoundsrainy11384 жыл бұрын
@@CodeVault ok thanks man
@davidsampson944 жыл бұрын
love these vids please continue very good
@starfart693 жыл бұрын
Around @8:30, line 22, why would you rather use another struct pointer p instead of just using the struct in line 19 which is points[100]? From what I understand you modified the values on the same address anyway.
@CodeVault3 жыл бұрын
Doing this: Point p = points[i]; sscanf(buffer, "%d %d %d", &p->x, &p->y, &p->val); Would NOT change the array as p would simply be a copy of "points[i]". But you could use points[i] directly if you don't like that pointer. Instead of sscanf(buffer, "%d %d %d", &p->x, &p->y, &p->val); it could be done with: sscanf(buffer, "%d %d %d", &points[i]->x, &points[i]->y, &points[i]->val); The pointer was just used for shortening the code.
@starfart693 жыл бұрын
@@CodeVault thank you!
@yourlocalsuedi4 жыл бұрын
Dude you saved my mf life! Greetings from Sweden! 🇸🇪
@othmaneer-rouhly81212 жыл бұрын
Thank you so much legend
@Zahra-qb7nm3 жыл бұрын
Hi thank you for your videos! Got a question though, in my program i’ve array of struct, struct User* user; And the elements are lets say username[200]; password[200]; But when i’m passing them to int functions, from one function to another, the data that has been saved before seems to vanish For example in a function i strcpy(user[i].username,”bluish”); and it saves successfully but when i pass it to another function it writes for that. Can tell where its problem? And in the function that im saving the username it’s like Signup(&user, i) so that it saves but in the other function it’s just (user,i) as arguements
@CodeVault3 жыл бұрын
How are you accessing that data?
@Zahra-qb7nm3 жыл бұрын
@@CodeVault ah thank you! It got sorted, the access was also through watch window, thank you for the video it helped me alot :)))
@TehRespawner2 жыл бұрын
thanks for the tutorial! but im having trouble understanding how the information gets stored in the variable 'points'. i dont see it being assigned other than the *p = points + i, but this is assigning p? .. sorry if my question is stupid, but im a beginner programmer so its a little bit confusing :)
@CodeVault2 жыл бұрын
It's this line that is setting things in the points array: sscanf(buffer, "%d %d %d", &p->x, &p->y, &p->val); Since *p = points + i; We know that p points to some element in the points array. Then, in that sscanf line we do: &p->x This is a two step process: p->x means "get whatever is at the address p is pointing to (which is an element in that array) and get the x member of that element" &p->x means "get the address of the result of p->x (from above)" Thus &p->x gives us an address to the x member inside of an element in that points array. Same logic for the rest of the parameters in that sscanf line
@mika17583 жыл бұрын
how can we do this for csv (excel) files
@CodeVault3 жыл бұрын
Just change the format string to output CSV: sscanf(buffer, "%d,%d,%d", &p->x, &p->y, &p->val);
@mika17583 жыл бұрын
@@CodeVault Thank you
@alexbravo74673 жыл бұрын
yes, thank you, buddyboy ...
@anupkodlekere86044 жыл бұрын
what shortcut did you use at 7:45 to select all the dots?
@CodeVault4 жыл бұрын
I pressed CTRL+D to create a new cursor at the next occurance of the same selection
@aibou23993 жыл бұрын
@@CodeVault nice!
@MKSundaram3 жыл бұрын
Yes, one of the best. How do I store lines from files into an array? I tried few things but failed. My file contains "test line 1 in the first line and in next line test line 2 and so on.... there is a total of four lines. One of the solutions was declaring a 2D array and store the four lines and this made me more confused, could you please help me? thanks :-)
@CodeVault3 жыл бұрын
Yea, basically a 2D array or an array of strings should be good enough. You can simply call in a while loop. char strArray[100][100]; while (fgets(strArray[i], 100, file) != NULL) { i++; } Something like this... also, make sure your file has a new line at the end so that the while loop doesn't stop prematurely.
@MKSundaram3 жыл бұрын
@@CodeVault Thanks a lot
@afsanehakhbari88803 жыл бұрын
thank you for perfect explanation would you please describe how we can pass struct and struct arrays to the pthread_creat
@CodeVault3 жыл бұрын
I will make a video on that. But it's really the same way as you'd pass an integer. Usually dynamically allocated so that it doesn't get overriden: struct Example e = malloc(sizeof(struct Example)); e->x = 1; e->y = 5; pthread_create(&th, NULL, &routine, e);
@afsanehakhbari88803 жыл бұрын
@@CodeVault thank you so much for the answer. Is there any platform for asking questions? because the way you introduce processes and threads are perfect and easy understandable.
@CodeVault3 жыл бұрын
Yes! I answer questions regularly on our Discord server: discord.code-vault.net There will soon be a similar feature on our website as well: code-vault.net
@ib16644 жыл бұрын
How do you delete a line of data in a serialized record
@CodeVault4 жыл бұрын
The easiest and foolproof way is to just read everything into an array, delete the element and write everything back into it
@asifsaad58274 жыл бұрын
same thing happens when you do that with class type?
@CodeVault4 жыл бұрын
Classes don't exist in C. But, sure, you can use the same technique with classes in C++. But you can use streams there.
@bharatnarayana84013 жыл бұрын
{"sam","0004","SDE1","VLSI"} what will be the de serialization format i.e to read this type of forat const char* PERSON_FORMAT_IN=....?
@CodeVault3 жыл бұрын
Here you can't really use %s, but you can specify that you only want a string with alphanumerics using the %[A-Za-z0-9], then just use that in the combination with the other characters found in that string.
@bharatnarayana84013 жыл бұрын
@@CodeVault {\"%[^\"]\",\"%[^\"]\",\"%[^\"]\",\"%[^\"]\"} this is not working {"%[A-Za-z0-9]","%[A-Za-z0-9]","%[A-Za-z0-9]","%[A-Za-z0-9]"} this works..?
@CodeVault3 жыл бұрын
@@bharatnarayana8401 Yep. You just need to not forget about the \ before each " Sorry for the late reply
@asifsaad58274 жыл бұрын
btw why did you write Point *p=points +i? can't we do like this Point *p=points[i] ?
@CodeVault4 жыл бұрын
No. points[i] is equivalent to *(points + i) which returns type Point Which means it would dereference that point. But we want a pointer to it, not the actual value since we want to modify the contents of that array. &points[i] would be equivalent to points + i which returns the type Point*
@asifsaad58274 жыл бұрын
@@CodeVault why did you use a pointer to insert elements into an array? can't you simply put the values of x,y and val (during every loop) in the array named "points"?
@asifsaad58274 жыл бұрын
@@CodeVault like this int i=0; while(!foef(file)) { sscanf(buffer,"%d %d %d",&points[i].x,&points[i].y,&points[i].val); i++; //rest are as usual }
@CodeVault4 жыл бұрын
Yep, you can. It was just shorter to write that way. I prefer to have a pointer to the iterated element in the array rather than repeating points[i] everywhere.
@kibisovnikita723 жыл бұрын
When is the next video?
@CodeVault3 жыл бұрын
Next week
@stickshift5833 жыл бұрын
Thank you!
@taherrezzag98484 жыл бұрын
but why you put fgets() out of while loop
@CodeVault4 жыл бұрын
It's so that you always call fgets right before checking if you're at the end of file. You could also call it inside but check it twice: while (!feof(file)) { fgets(buffer, 200, file); if (feof(file)) { break; } }
@asifsaad58274 жыл бұрын
@@CodeVault why did you write an If statement inside while loop? when the file reaches the end of it, then will simply be out of the loop due to the condition set by the while loop
@CodeVault4 жыл бұрын
This is assuming that you also process this data in some way. Like this: while (!feof(file)) { fgets(buffer, 200, file); if (feof(file)) { break; } // Processing goes here sscanf(buffer, ...); } If we don't add that if statement, fgets wouldn't read anything and that would prompt sscanf to process the previous value that was in buffer thus duplicating the value (similarly to how I showed in the video)
@asifsaad58274 жыл бұрын
@@CodeVault what if there is only one line of input in txt file? then what ? it won't enter the while loop ?? right?
@mongraal22722 жыл бұрын
thank u bro
@gabrielcalper62954 жыл бұрын
I'm Brazilian(not English speaker) learning this in English is easier than my teacher lecturing hahahahahahhhaha
@maedesolgi82512 жыл бұрын
Thanks
@armandolopezespinoza38234 жыл бұрын
Read json array of object deserialize on struct, please
@taherrezzag98484 жыл бұрын
thanks for help
@sagarbasnet60884 жыл бұрын
please make video about List in C.
@CodeVault4 жыл бұрын
Here's a playlist for linked lists in C, hope this helps: kzbin.info/aero/PLfqABt5AS4FmXeWuuNDS3XGENJO1VYGxl
@relaxingweathersoundsrainy11384 жыл бұрын
you are the best 🤗🤗🤗
@naruz52623 жыл бұрын
I love your videos , please consider making a patreon , i would love to contribute to make this channel bigger ...
@CodeVault3 жыл бұрын
Thank you! We just launched the new website and it now has a shop where you can buy educational materials. If you find something useful there feel free to get as all the money goes into supporting this channel and community: code-vault.net/shop