Null
Null
This is like the first link in google: https://www.geeksforgeeks.org/c-program-to-read-contents-of-whole-file/
🙃
Null
Xitino :(
hiiiii
DaviChan
welcome :)
Xitino :(
could anybody tell me what's useful about passing a pointer to a function? What's the advantage of it instead of passing a variable using &?
DaviChan
DaviChan
a reference should not be nullable. This is how it is used in 99% of cases. Ofc. you can get a reference to be null, but not that easily
Xitino :(
i don't get it
Xitino :(
DaviChan
yeah, you normally don't want that. I just meant it is theoretically possible, but should (im my view) never be used, because in my view the whole point of a reference is that its not optional like a pointer is.
DaviChan
for pointers you always had to check:
if(pointer == nullptr)
the advantage of reference is that it should never occur 😅
DaviChan
a limitation to that is ofc. that it cant easily be reassigned
Xitino :(
but i can't think about one particular reason why i should reassign a pointer in my code 😂
DaviChan
yeah, then use a reference
AlanCcE
Mar!o
Use assembly 🥴
assembly does not help here - file read is IO (disk) bound
the fastest way to read a whole file:
1. open file stream
2. determine file size
3. allocate buffer with file size
4. read whole file at once into buffer without reallocating
5. done
布丁
不看女人
Is this a beginner group or an advanced group?
Ziky
DaviChan
klimi
Ziky
?
Be honest we often fail to understand question of newcomers 🤷♂
AlanCcE
Karam
c#?
Emanuel
Heey guys so am new to C programming and I would like to configure my Visual studio for C programming could u help...?
Engineer
Jose
beginner
Nope, it's a mixed group. There are introductory questions, beginner, medium and advanced questions, and it's pretty!
Er Manu
If you consider a variable a named object and an object some Memory allocated with a type and a value, an instance of a class can be considered a variable ?
Ziky
well If i get it right then yes
Ziky
variable is basically struct with single member. And object is struct holding all nonstatic members plus pointer to virtual methods if class have any
dimazava
int i = 5;
int *a = &i;
auto b = a;
why b is int*, but not int? Thought auto should kind of remove all the pointing, referencing and volatile properties from variable?
dimazava
Chat Boss
Sid Xid sent a code, it has been re-uploaded as a file
Olivia
what is the difference between
int n* h;
int n* &j;
please explain in simply everyone thankyou :)
Null
Dima
wtf is that syntax
Perush
Hey,
What might be a good way to master Multidimensional arrays
Ziky
Ziky
It is nothing more than few more pairs of brackets
sujith
can anyone help me regarding simple pipeline with instruction decoder in c/c++?
Osama
hello guys, what'up
Osama
I want to learn basic programming with c++ and then data structure and algorithm
what is your advice?
Anonymous
In what case can we use public fields and where can't we use a setter/getter at the class field?
DaviChan
klimi
Osama
thanks guys
omar
Hello everyone,
i learnt c++ basics and oop
Now iam lost and don't know what to do after :(((((((((((((((
klimi
omar
omar
Console projects u mean ?
Otumian
Console projects u mean ?
nah... Like data types, generic.. things like that.. Google c++ templates and see.. you'd like it
omar
omar
By the way sorry for my bad English
IDCAN
What the difference between declaring local variable with struct operator or no?
Example:
struct curl_slist* slist1;
curl_slist* slist2;
Ziky
IDCAN
struct PERSON sister; // C style structure declaration
PERSON brother; // C++ style structure declaration
IDCAN
https://learn.microsoft.com/en-us/cpp/cpp/struct-cpp?view=msvc-170
IDCAN
IDCAN
i gotchu
IDCAN
thanks
布丁
btw are there any large C projects currently using C17?
布丁
Ashkan
Hi guys. I have a little knowledge about Python and interested in C and C++.
In Python there is a GUI library
Ashkan
Tkinter in Python.
Is there any GUI library in C++ like python?
Ashkan
Anonymous
AlanCcE
What do you guys think about GTK for UI?
Puspam