Format and parse datetime in C

preview_player
Показать описание
Source code can be found here:

===== Support us through our store =====

===== Check out our website =====

===== Check out our Discord server =====
Рекомендации по теме
Комментарии
Автор

I found this hidden gem two days ago, and it single-handedly saved me from copying my assignment to doing it on my own. I think I have watched more than 12-13 videos in the last two days. Thanks for your efforts 🙏.

kanekikun
Автор

doubt:
A program in the language c, that does the following:
of a file A and a file B.
From file A it will read each row and each value in the row will assign it to a variable, except the first one which will assign it to an array. The first row will contain from 1 to n values, separated by the tab and that will be an array which will be a counter to do the following:
The entire contents of file B will be read and assigned to a variable, for example: variable Bfile .
For each element of the matrix, a text will be replaced inside the Bfile variable, and a file will be created for each element of the matrix.
example:
file A:
dataone \t datatwo \t datathree
value2
value3
value4
value5
B-file
foo foo foo Datartoreplace1 foo foo foo Datarepalce2 foo foo foo Datarepalce3 foo foo Datarepalce4 foo foo Datareplace5
Process
step one .- Read all the contents of file B and assign it to a variable, called Bfile.
step two.- read file A, create an array with the data from row 1 with the name arrayElements (in the example it is an array of three elements).
step three.- Assign the value of the second row of file A to the variable ReplaceValue1.
step three.- Assign the value of the third row of file A to the variable ReplaceValue2.
step three.- Assign the value of the fourth row of file A to the variable ReplaceValue3.
step three.- Assign the value of the fifth row of file A to the variable ReplaceValue4.
step four.- for each element of the arrayElements array, replace the first element of the array inside the Bfile variable with the text Datartoreplace1; replace the text Datarepalce2 with the variable ReplaceValue1; replace the text Datarepalce3 with the variable ReplaceValue2; replace the text Datarepalce4 with the variable ReplaceValue3; replace the text Datarepalce5 with the variable ReplaceValue4;
and at the end of the loop, save a text file with the name of the array element, in this case dataone . Do the same for the other elements.

robertocruz
Автор

I have a c code with 4 different variables, each one with a different timestamp. I've tried to use strcpy and ctime_r, but none of them allows me to have different values for the timestamps. When one of them gets updated, the other timestamps also get updated, even though they are inside if's and have different names. Is there any sollution for my problem?

luisinha
Автор

Hi, is it possible to create a function that accepts different types of data? I have a function in my program and I would like to either accepts an int as an argument or a struct and would want do to different things depending on what data type it is

lettever
Автор

Is there a way to add symbols while the user is typing? "/", for example. Great video, thank you.

leonardopisano
Автор

can we have videos about how in linux, processes don't really exists and units of exection are rather threads and thread groups? in particular the clone() syscall and how fork is a subset of clone. that'd be really lovely

mehregankbi
Автор

Over 80 000 IT employees lost their job this month in big tech, not one could show you a simple log subroutine? Yes, I think so.

vilijanac
Автор

You didn't link the video up top 🙂 - but thanks again for a great tutorial 👍

NotMarkKnopfler
Автор

Why does it return the same time after the two second delay, and how do we get around it?

NotMarkKnopfler