mj12
mj12
Elil 50
Do you know how to solve?
https://stackoverflow.com/questions/74670725/c-libraries-in-python-initializing-pseudo-random-generator-seed-each-time-in
Anonymous
hi, who can help me?
klimi
Anonymous
hi, please help me
curl_easy_setopt(curl, CURLOPT_URL, "example/ip=%d&port=%d&time=%d", argv[1], argv[2], argv[3]);
error: macro "curl_easy_setopt" passed 6 arguments, but takes just 3
Anonymous
so you can help me with my problem?
Edy
But program doesn’t work
The program works... But nothing appears to the screen... Check how the Cout function works
Edy
Correct
🇺🇸
Jose
Persia
Guys do you know any good lessons for learning c++? From zero to advanced
Sarmat
When i bulding assimp library to android i have this error, NDK is broken, or what?
E:/C++/assimp/tools/NDK/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1\fstream:952:20: error: use of undeclared identifier
'ftello'; did you mean 'ftell'?
pos_type __r = ftello(__file_);
^
E:/C++/assimp/tools/NDK/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1\cstdio:141:9: note: 'ftell' declared here
using ::ftell;
^
1 error generated.
mingw32-make[2]: *** [code\CMakeFiles\assimp.dir\build.make:159: code/CMakeFiles/assimp.dir/Common/ImporterRegistry.cpp.o] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:159: code/CMakeFiles/assimp.dir/all] Error 2
mingw32-make: *** [Makefile:135: all] Error 2
Marshall
Is it possible to save a histogram to a folder in my pc without plotting it? (Im using matlab)
klimi
klimi
you plot it and then save it?
Marshall
Marshall
Without that line i ended up having 1816 open windows and my pc was crashing. But doing it this way it "overwrites" every figure
Thadeu
It is easy to provide a kind of polymorphism in C using the combination of macros + functions receiving void * values. These macros can act as truly functions when its results are encapsulated with parenthesis and with an specie of return created with comparison operators. These combos (macro+void parameterized functions) avoids the excessive usage of inlining and the functions can be present as static (with guards agains recurrent including) and easy portable. A full C library of tools can be built this way for many kinds of algorithms.
The question is... as it is simple, if well tested (against memory problems), there is some other downside?
ubwzwd
Anupam2.7
c and c++ are considered as high or low level programing language?
I have already googled and got some mix answer.
Nomid Íkorni-Sciurus
Though, for what it matters, C was born as an "abstraction layer" of assembly
so it COULD have been considered "low" in older versions like C89 but it's just a matter of technical details.
Jose
Nomid Íkorni-Sciurus
kww
bro was just asking but still got mixed answers
Nomid Íkorni-Sciurus
bro was just asking but still got mixed answers
the concept of "low" or "high" doesn't make sense nowadays
this is not a mixed answer
rather, kind of a demonstration of how we usually misuse / mistell stuff.
kww
Anupam2.7
Thanks
Thadeu
c and c++ are considered as high or low level programing language?
I have already googled and got some mix answer.
It is relative.
lower is nearly to the eletrical signal passed to machine, higher is in relation to abstraction (in human or mathematical language).
So assembly is high compared to the way eletrical signals are emitted.
To an assembly coder, C is high level. To a C programmer assembly is low and Python is high level. To a Java programmer C is low. Someone still can argue that JS is higher than Java as JS is dynamically typed and so on...
Usually high levels contains abstractions but also "sugar" and are less performant, just because the compilation, transpilation or interpretation process of code make assumptions to avoid mistakes and who program in higher level languages can't deal with the resulted lower level result.
Yari
I'm trying to develop a program that solves Sudoku grids using recursion and backtracking. I'm not having the desired result, can you correct me?
Nomid Íkorni-Sciurus
Nomid Íkorni-Sciurus
language compilers that rely on meta-machine wizardry like .NET (CLR/IL), the GCC suite (C--) and LLVM don't necessarily clog the output binary in terms of memory
Nomid Íkorni-Sciurus
this is a thing in the moment you understand compiler attributes and how to write efficient multicore code
Nomid Íkorni-Sciurus
What I mean by «the concept of "high" and "low" does not make sense» is that contextually, a programmer will 99.99% never, nowadays, write plain opcode/machine code or even assembly
Nomid Íkorni-Sciurus
Though consider that "Assembly" itself is not a language
but rather a family of very different languages that do not even necessarily map 1:1 to machine opcodes
Nomid Íkorni-Sciurus
so, stating that "C is higher level than Assembly is" is not true for every language in the Assembly family
Nomid Íkorni-Sciurus
If you wrote a JS frontend for LLVM, it would still compile down to executable machine code (which actually, already happens JIT in your browser)
Nomid Íkorni-Sciurus
so the statement "higher level language are less performant" is just false
Nomid Íkorni-Sciurus
as they always say, there is just "bad code" or "decent code"
Nomid Íkorni-Sciurus
and all of this applies...
unless you're speaking of interpreted languages
which tend to be slower/less efficient because of the specific overhead caused by their interpreters (e.g. Ruby or Python or such)
though this is not a rule of thumb.
Thadeu
so the statement "higher level language are less performant" is just false
1. I told a way to understand what is high and low: the way of abstraction.
A high is not always fast and not always performant, due to sugarization and abstraction.
Some "simple" code people write, by example, using an insertion in array. If it is not pushed it is mem moved. Due to sugarization, some language (or pattern) may always add a test to decide if memmove or not. It is a short example to illustrate that the abstraction hidden what is done, sometimes requiring more work that needed and leading to more memory/cycle comsumption.
Even JIT may suffer this way from sugarization.
Nomid Íkorni-Sciurus
Nomid Íkorni-Sciurus
indeed, I didn't consider this detail
Nomid Íkorni-Sciurus
okay, I see your point
M
What's this line mean ?
char *aaa[]
Is it array or string?
hrb
int str_equal(char* str1, char * str2)
{
while(*str1==*str2) {
str1++;
str2++;
}
if (*str1 == '\0' && *str2 == '\0')
{
printf("%d\n", 1);
return 1;
}
else {
printf("%d\n", 0);
return 0;
}
}
hrb
i have this code its supposed to return 1 if two strings are identical and 0 if they are not
M
When I use it uninitialized it will occur error,
But when I use it in struct error will dispear
How is it ?
hrb
its not working 😐
M
And is there any difference if I use size on bracket or leave it empty ?
Anupam2.7
Why do we prefer writing recursive function over looping(in DSA) while both of them are havin same time complexity? For eg. The program of factorial in recursive and loopong both take O(n) time.
Anonymous
I find it useful to know how problems are solved in different languages. That gives me perspective and results in better code I think.
scar tissue
Anonymous
this group is amazing. Can't you teach me how to make a complex calculator?
klimi
Toxirov Sherzod
Hi. Who knows how to print symmetric triangle shape in c++
Anonymous
Do you have a manual book about C++.
Anonymous
C Programming Absolute Beginner's Guide 3rd Edition
by Greg Perry
Anonymous
Use this book and remember to practice a lot.
Anonymous
Yeerriinn_
hi guys, i have a question. i have to build a program to find the x intercept using bisection method. One of the function is (1/7 + 1/x) and it gives the wrong x-intercept. But when i write the function as (1.0/7 + 1/x), the intercept is correct. Does anyone know why it should be 1.0 and not only 1?
Thadeu
Yeerriinn_
yes, i set it to double by the way
PIZZA
Yeerriinn_
what is bodmas rule?
PIZZA
what is bodmas rule?
it's a mathematic rules to gives the multiple operators priority in a equation
Yeerriinn_
ah i see. so if i write it (1/7)+ (1/x)= it will do 1/7 first then + (1/x) or it will +1 first then divide by x?
PIZZA
Kishore
H
SirCourage
PLS I need assistance
SirCourage