%Nikita
I learnt about basic of avr c, I mean shift register DDR, PORT, PIN but I'm looking for doc about sensor, and advanced functions.
Hm. I think you need to implement those advanced functions yourself, or if you program in C, try to search for some libs
%Nikita
Because avr c is just about moving values from one register to another
\Device\NUL
It's just lazy people who uses bits/stdc++.h
\Device\NUL
ok, but the approach to the two first two indexes? In the case I would change a bit...
If your point using C-like std::vector is for automatically adjust size and saving memory then isn't good imo. Sometimes Large buffer is exhausting memory, but sometimes its good since heap-allocate is using syscall (which is slower than just using stack)
Eshan
That's non standard AND SHOULD NOT BE USED
Does this cause some errors in code at some point or just for cide "quality and best practices" thing
Eshan
Code quality**
Eshan
Ok thanks for adding something to my existing knowledge i will verify it later
/
Help what does the /dev directory contain in linux
/
I understanded that it contains device files
/
Some time ago I have asked how to render things on the screen without using opengl and found that there is a directory in dev called fb0
/
How can it be used to draw on screen
Thadeu
If your point using C-like std::vector is for automatically adjust size and saving memory then isn't good imo. Sometimes Large buffer is exhausting memory, but sometimes its good since heap-allocate is using syscall (which is slower than just using stack)
Yes, I'm doing a Lua C module. The array will passed around via userdata and freed only on Lua gc metamethod. As for other modules I will need some similar, so I'm searching for a way stable to reuse. I was doing a struct with three members, one for No. of members allocated, one for the used length and other for the array data. It worked and I could even reuse the same struct after array was freed, but I thought it would be an overkill when found the example I shared with you. I will play with this, perhaps encapsulating in a mix of macro and function to have fine grain control of malloc/realloc error. Thank you :)
Mr
Who?
neovstan
Who?
not you
Wolfreddif
I need a book for DSA using C++ , please recommend some and if have pdf then please share.
Bigissue
Hi I want ask you How can I implement in C,C++ a dynamic table structures? I want save some data like a database.
Bigissue
I would must use matrics?
Azat
You can just use pointer to array of pointers pointing to array of some datatype
Bigissue
You can just use pointer to array of pointers pointing to array of some datatype
yes man, I'm going to create an array that has a point to others array for implement rows so
Bigissue
Check "tuple" in STL C++.
Ok now I search "tuple" thanks
Konstantin
Ok now I search "tuple" thanks
check also "vector" and "map" for your task.
Bigissue
check also "vector" and "map" for your task.
if I want programming only in C tuple vector and map are not present. what should I use in C?
Bigissue
In C you have pointeers only
ok thank you so much sir! thank you.
Anonymous
Hi guys i've a challenge, can some1 help. How do i change any given exponent number to decimal in c programming, like 10300c-2? I tried searching on internet but the programs im getting arent producing the desired answers, as in i cannot input the exponent to get the decimal. I am new to c programming so i am trying out some practical questions. Any help or pointers wil be helpful
Danial
Ok sorry✋👍
Larbi
Questions • Write a program to compute the number of collisions required in a long random sequence of insertions using linear probing, quadratic probing, and double hashing. The sequence length should be 100, 000 elements. To do this, use the average of the five experiments while changing the random seed each time to get an unbiased estimate. The count of the number of collisions should also take into account the collisions encountered during the collision resolution loop. • Extend the previous program to count the number of collisions with different load factors (0.10, 0.15, ...0.95). Plot the curve of the number of collisions vs sequence length. Here, the table size should be set to 100, 003. Additionally, you need to change the rehash condition to be able to achieve a load factor greater than 0.5. For example, a load factor of 0.7 can be obtained by using a sequence having the length 100003 ∗ 0.7 = 70003. • Do the same profiling, but this time based on the execution time of the sequence insertion. • Which of the three algorithms performs better in terms of number of collisions and execution time? • Compare the winning algorithm in terms of execution time with the provided implementation of the Cuckoo hash method. What do you notice ?
Larbi
i got this as a homework and I did not understand it
Larbi
can someone explain it to me please
ʙʀʜᴏᴏᴍ ⑇
In file included from comparing.hpp:1, from Hebara_2.cpp:7: student_struct.hpp:3:8: error: redefinition of 'struct Student' 3 | struct Student | ^~~~~~~ In file included from Hebara_2.cpp:6: student_struct.hpp:3:8: note: previous definition of 'struct Student' 3 | struct Student | ^~~~~~~ PS D:\vscode files\C CPP\C++\
ʙʀʜᴏᴏᴍ ⑇
any help plz
Asker
How can cout some numbers such as 4.1234 or 5.2355. I need only the four number after point
Danial
you have to wite%.4lf
Asker
%4lf ?
Asker
Ok great thanks
Danial
%4lf ?
no you have to write . too in between
alessandro
why u don't use C code
alessandro
one example: (sorry my bad code, but i'm new with avr)
Anonymous
why u don't use C code
Because its for arduino and i dont know so much
Anonymous
Can u help me?
alessandro
i think you could download avr studio
alessandro
https://www.microchip.com/en-us/tools-resources/develop/microchip-studio#Downloads
ved prakash
I need a help friends
ved prakash
How to add c compiler in vs code?
ved prakash
Through Extension
still not happening bro
Danial
ved prakash
Yes bro
Danial
Have you windows?!
ved prakash
Yes
Danial
First you have to download minGW
Danial
Habe you done that?
Danial
Have you changed you settings environment?!
Danial
I have to go maybe somebody else help goodbye
ved prakash
No
Mr
How can cout some numbers such as 4.1234 or 5.2355. I need only the four number after point
https://stackoverflow.com/questions/5907031/printing-the-correct-number-of-decimal-points-with-cout Check it out
Mr
still not happening bro
Search on YT there's a lot of videos about that.
olli
How to add c compiler in vs code?
1. Download and Install Visual Studio Code - Go to code.visualstudio.com and download Visual Studio Code - Install and at the 'additional tasks' section make sure "Open With Code" and "Add to Path" are selected 2. Download and Install a compiler You can either use MSVC that comes with Visual Studio (not VSCode) or use GCC as part of a mingw distrubion, I recommend using nuwen's distro as it is small and fairly recent. - Go to the MinGW Distro page and download the self-extracting archive [1] - Select a target directory to install it to, (e.g. C:\) - Add the bin directory to your environment path (the bin directory is your target directory + MinGW\bin, so in this case it would be C:\MinGW\bin) - You should be able to open a command prompt and verify your compiler is found, e.g. by entering gcc --version 3. Setup Visual Studio Code - Open VSCode and head over to the extension menu (CTRL + SHIFT + X) on the left hand side, search for the C/C++ extension by Microsoft and install it and restart Visual Studio Code afterwards. 4. Getting started - Create a folder for your project, right-click and "Open with Code". Whenever you opened a workspace the status bar at the bottom will be blue. Otherwise it will be purple. - Create a file and write your code. - On the left hand side, select the "Run" option (CTRL + SHIFT + D) and click "Run and Debug", select "C++ (GDB/LLDB)" and g++ as the compiler. - This will create the default launch configuration. Pressing "F5" will build and start your currently focused file. - At this point IntelliSense should be working and you should be able to set breakpoints and step through your code. [1] https://nuwen.net/files/mingw/mingw-18.0.exe
Anonymous
Hi there, in JavaScript NaN is a number, is this same in c++?
Anonymous
Typeof(NaN) -> ?
Anonymous
Pls test it for me😊🙏🙏🙏
Anonymous
I know there is NULL
Typeof(null) -> ?
smene
Typeof(null) -> ?
there's no typeof in c++
Anonymous
there's no typeof in c++
No alternative?😕
smene
No alternative?😕
you can use typeid... btw null is nan due to js conversion in Number
smene
No alternative?😕
NULL is right equal to 0 #define NULL 0
Anonymous
NULL is right equal to 0 #define NULL 0
Kk In js NaN is a number that not equal to 0, not less than and more than 0.🤷‍♂