V01D
Is there any way to trick C into accepting default function arguments / optional function arguments?
Or do I have to use C++ for that?
Anonymous
I think thats only there for C++
V01D
Okay, thanks.
Vlad
Vlad
You may create a helper function with optional parameters declared as pointers
Vlad
And if a parameter is NULL call function with the default that you wish
Vlad
But you still have to put these NULLs in the call
V01D
So if I didn't put NULL in the function call I would get a compiler error, right?
Vlad
V01D
void func(char* str, void* anything)
{
// do stuff
}
int main()
{
func(NULL, NULL);
}
This is what I got from your explanation.
Vlad
But I would do just a name convention for that. If you don't have too many optional parameters
Anonymous
https://i.imgur.com/2wgiccC.png
Anonymous
THis is a brand new install, Still getting this damn error
V01D
Anonymous
THis install isnt even a month old
Anonymous
Any ideas?
Pavel
Any ideas?
The error says that windows sdk is not found, I would start from installing (reinstalling) it.
Not sure why it needs it for a console application though.
Vlad
Any ideas?
Try setting existing one in the project settings
Vlad
Chances are they just different versions
Anonymous
/programming
Anonymous
tf is that
Anonymous
But it needs this version.....
Vlad
Get into this menu and change it
Vlad
On the sdk version that's installed on your pc
Vlad
Yeah ms products still are very convenient
Bala
Bala
I am getting this error while I am running my code in dev-c++ app
Anonymous
Vlad
Vlad
If so close it and try again
Vlad
If it's running compiler cannot override it's file
Anonymous
/get cppbookguide
Anonymous
/get ide
Anonymous
Why is that not working?
Abishek khanna
What is difference between C and C++
Kenny
C++ is like a high level version of C
V01D
What is difference between C and C++
C was built back when a language had a specific use case unlike python which does everything.
You can do ALOT with C, however it was built to develop kernels, compilers, etc.
C++ kind of bridges that gap.
Note that C++ is OOP, where as C is ROP.
Abishek khanna
V01D
neb
*This post have been vetted and approved by admins!*
If someone is interested in a quick and easy way to taste FreeBSD we made a group for NomadBSD which is a persistent live USB distro with ability to install to hardware. Great for testing compatibility.
@NomadBSD_public
https://nomadbsd.org/
Anonymous
well done
Alex
Vlad
Anonymous
guys, I have a code that generates 4 arrays, two with matches and two that point to matches, to run in 1 repetition, it works smoothly, but when I perform 2 or more repetitions, in each repetition it adds positions in the array in place to simply update the values
Yaw
/get
Yaw
/get cbook
V01D
Cengizhan
guys, I have a code that generates 4 arrays, two with matches and two that point to matches, to run in 1 repetition, it works smoothly, but when I perform 2 or more repetitions, in each repetition it adds positions in the array in place to simply update the values
Perfect, great code. Especially I like a,b,c,d,e,f but g is missing. why?
Vlad
Always wondered why in C where it's the most important to name things convenient way some people go for alphabetical variables instead?
Anonymous
Anonymous
Cengizhan
Anonymous
M__
can someone get me this book "The c++ standard library - nicolai m josuttis
V01D
V01D
Look yourself, smh
kodes
If I use two nested for loop let's say 'i' and inside 'i' use 'j' and inside 'j' if I use another while loop then will the time complexity be O(n^2) or O(n^3)??
klimi
2 nested loops -> O(n^2)
3 nested loops -> O(n^3)
Artöm
It depends on how i/j changes in terms of n
Artöm
klimi
Artöm
E.g. this one has logarithmic complexity
for (int i = 0; i < n; i *= 2) {}
Cengizhan
Artöm
logn
Kenny
Do you know where i can learn about complexity, etc
Kenny
And memoization, and stuff like that
V01D
Kenny
Ty man
kodes
You can check here for the resources
kodes