Palinuro
You said "Visual Studio Code is NOT vscode"
exactly like microsoft explained in their website
Palinuro
You were talking about the repo
the repo contains a software officially called vscode (it is not an abbreviation) which is open source (but not copyleft) and released under the MIT license. microsoft then created their own vscode distribution called Visual Studio Code (shortened in VS Code but not vscode) which is released under a microsoft proprietary license with some modified configuration files and some additional plugins for telemetry and other similar functionalities they have not really described vscode can be downloaded only as source code from github visual studio code is available ONLY as a compiled binary from code.visualstudio.com
Jay
@dizaztor @usebsd 🖖
Jay
Have fun 😁
Anonymous
Bohdan
Hi, can you please refer me to someone resources where I can read about creating processes. I know the way how to create one process, but I need to make set of different processes and run them concurrently , also get error message if there are some from those processes
Bohdan
Also what is the difference between user time and kernel time in terms of processes?
Eu
for the concurrent processes, you should read about fork, exec, popen...
Eu
and for the difference between user and kernel mode, the former is the time that your code is running, and the latter is the time that you are waiting for kernel stuff, like wait for mapping a file in memory, allocating... more or less
Eu
https://linux.die.net/man/7/time
Bohdan
Thank you
Eu
yw!
Anonymous
Kampret
Bohdan
Can you please tell me, if I have vector<vector<int>> a and vector<vector<int>> b, and write a=b now variable 'a' has reference to the b like in java or now it is has copy of 'b'? So when I change something in 'a' there are would beno changes in 'b' ?
correctmaninwrongplace
Look at the references in google, i think that containers have their operator = implemented so b would be a copy of a but they arent the same object("different references")
correctmaninwrongplace
But im not sure 100%
Eu
it should be as correctmaninwrongplace say. To make as java, b should be a pointer or reference (i.e., vector<vector<int>> & or vector<vector<int>> *.
Anonymous
Hey guys
Top T : Trollface Was Real
International group of C/C++ programming Grupo internacional de programación en C y C++. ✔️ C o C++ ✔️ Assembly ✔️ Debugging ✔️ Hacking 🔞 - Pornography ⛔️ - Spam ⛔️ - Abuse ⛔️ - Religion or ideological ✝☪🔯
Bohdan
Thanks for the answers guys!
Go
Is there any way to get interview questions with answers ?
Go
Pdf or group link ?
Martin
Interview questions don't have a standard answer. Sounds like a bad idea to me.
Jay
https://www.goodreads.com/book/show/12447064-head-first-c
Jay
No problem :)
Jay
After that this one https://en.m.wikipedia.org/wiki/C_(programming_language)
Mat
Good learning!
Abde
Hello! I've got a function that when a condition is not true then it does a printf. When I use this function the printf crashes however if I use printf before calling this function it does not crash. In C
Abde
Main function: #include <stdio.h> #include <stdlib.h> #include "test.h" int main(int argc, char** argv) { tHospital hospital; init_hospital(&hospital); new_medicine(&hospital, 100, "Aspirina", "Bayer"); new_medicine(&hospital, 200, "Gelocatil", "Gelos"); new_medicine(&hospital, 100, "Ibuprofeno", "Cinfa"); return 0; }
Abde
test.h typedef struct{ char* name; char* labName; unsigned int code; unsigned int units; } tMedicine; typedef struct{ tMedicine* medicines; int medicinesCount; int patientsCount; } tHospital; int tmedicine_find(tHospital *hospital, unsigned int codeMedicine); void tmedicine_new(tMedicine *dest, unsigned int medicineCode, char* name, char* labName, int units); void init_hospital(tHospital *hospital); void new_medicine(tHospital *hospital, unsigned int medicineCode, char* name, char* labName);
Abde
test.c (only the problematic function) :
Abde
function that crashes: void new_medicine(tHospital *hospital, unsigned int medicineCode, char* name, char* labName){ if (tmedicine_find(hospital, medicineCode)==-1) { if(hospital->medicinesCount == 0){ hospital->medicines=(tMedicine*)malloc(sizeof(tMedicine)); if(hospital->medicines==NULL){ printf("ERROR: Memory error.\n"); return; } hospital->medicinesCount=1; } else { hospital->medicines=(tMedicine*)realloc(hospital->medicines, hospital->medicinesCount+1 * sizeof(tMedicine)); if(hospital->medicines==NULL){ printf("ERROR: Memory error.\n"); return; } hospital->medicinesCount+=1; } tmedicine_fill(&hospital->medicines[hospital->medicinesCount-1], medicineCode, name, labName, 0); } else { printf("Medicine with code already stored\n"); } }
Abde
"printf("Medicine with code already stored\n");" part crashes, however if I add printf("\n"); before tHospital hospital; it works
Abde
nvm
Abde
I've got it
Abde
correct way: realloc(hospital->medicines, (hospital->medicinesCount+1) * sizeof(tMedicine));
Anastasia
C/C++ group listed among the top Telegram resources for developers https://qubit-labs.com/telegram-channels-sharpen-software-development-skills/. Congratulations!😉
Top T : Trollface Was Real
👍
Anonymous
Does anyone have a link to a course for beginners?
Jay
Jay
Does anyone have a link to a course for beginners?
http://www.learn-c.org I recommend books but still you can try this one
Jay
https://www.w3resource.com/c-programming-exercises/
Jay
O. I think she wants online practice thing
Top T : Trollface Was Real
There's an app for this.
Top T : Trollface Was Real
Called Sololearn
Top T : Trollface Was Real
Let me 🔎 Google that for you: 🔎 Sololearn Application
Anonymous
Thanks guys! 😊
Theophile
Hermann
hi
Hermann
i need learn c language.. anyone help me to start?
Hermann
i don't start from 0
Hermann
honestly I need an advanced guide to become stronger
Hafiz Hilman
Learn basic syntax. Make a project (ideally, to solve your basic problem). Break things. I think that is the best way to learn.
Jay
honestly I need an advanced guide to become stronger
Reading code and manual and join Open source project which interest you and subscribe to their dev maillist and try to submit Patches to opened tickets
Jay
http://www.netbsd.org/developers/PR.html
Jay
Example
Hermann
👍😊
Bismuth
Hey guys... How do you convert senconds to hour, minutes and seconds (HH:MM:SS) format
Bismuth
?
Bismuth
dunno what u r talking about haha
Bismuth
I think thats it
Bismuth
...haha
Bismuth
So...how?
Stanislav
https://wandbox.org/permlink/fffKInrlHqPRb0rA
deltanicola
Have to make this draw to learn how to programm a 3d graphic programm
deltanicola
Check vulcan
What is ?
Roxifλsz 🇱🇹
What is ?
Graphics API just like openGL, except Vulcan can get better performance and openGL supports more hardware (for now)
deltanicola
Ok nvm
deltanicola
Check vulcan
Thank you anyway
Jay
🖖
Jay
I thought it was a tutorial...
https://www.khronos.org/vulkan