Vlad
Why
Guess it's not C++
Vlad
It's web development
Light
vector<int> * graph = new vector<int>[nv]; I am not able to add items to graph using this (graph+v1)->push_back(v2) I am assuming it is due to (graph+v1) is null. Is there a better way to declare the array of vectors?
Sench
Ok sorry
Vlad
new and containers don't mix
Light
Tried that also vector<vector<big>> graph(nv, vector<big>());
Light
But it is giving bad_alloc() error
Light
big = long long int
Vlad
nv is what value?
Vlad
Have you initialized it?
Light
int nv; cin»nv; vector<vector<int>> graph(nv, vector<int>());
Vlad
Where is the check for input Jonny?
Vlad
What if I enter 'asfasdgsadgasd' into the program?
Vlad
Or -1
Light
okay I think that is the issue. Thanks for the help.
Light
I was actually reading values from a file using cin. I created the file in a wrong location so the file did not exist. But the program was not throwing any error that is is not able to find the file😂. That is why I thought it is reading from the file. But in reality nv contained garbage value.
\Device\NUL
why you hate VLA?
It's slow and it's dangerous to stack overflow. Even The Linux Creator hate it
V
Hey sup guys! About build libs, I know that have 2 type of lib, dynamic and static. Dynamic (like a .dll) is apart of "client" and is a dependency. Static (like .lib) turns able to compile everything in jus one bin. Nice. Well, I have a lib but when I use it, the "client" have access (and dependency) on my lib dependencies (lib depends on Boost, client needs too). I was reading about static link that lib, but don't know if I really understood, can static .lib have all of your dependency on it binary file? Or just dynamic libs?
Filippo
Hey guys does anyone know how tò use createremothetherad function
V
Sorry, could you clarify that static "(like .lib)" executable ?
Static libraries (like .lib) turns possible to compile everything in just one binary file
\Device\NUL
Static executable means embed the library also in the executable, cmiiw
\Device\NUL
For example you pass user32.lib in the MSVC compiler. That doesn't prove it's static
Anonymous
so even if i do it indirectly with pointers, it won't crash will it?
It might crash (Undefined Behavior) on implementations where threads are not allocated in the same address space as that of the process. On such implementations (OpenBSD for example), there is no way to access the thread local variable of one thread from another thread.
𝔗𝔞𝔫𝔫𝔦𝔠𝔄𝔯𝔠𝔥𝔢𝔯
Hiall
𝔗𝔞𝔫𝔫𝔦𝔠𝔄𝔯𝔠𝔥𝔢𝔯
Guys reimport 2010 visual studio project in 2022 good idea or no?
TheDevOps
Hello community, what projects can I work on as a beginner who has learnt C language. Please
Anonymous
Hello community, what projects can I work on as a beginner who has learnt C language. Please
Depends on how comfortable you are with the language. I would suggest looking through projects already implemented in the language of your choice and understanding them before you work on projects of your own. This is a good place to start: https://github.com/codecrafters-io/build-your-own-x
abdisa
Hello community, what projects can I work on as a beginner who has learnt C language. Please
You should ask GPT but since you asked create something related to setting request actually there is a library called libcurl or curl use that and create a simple stract that you can assign to an object to send an http request and return the response in a formatted manner
محمد
How to solve the problem found the digram
April
Is assembly still embedded in AT&T syntax when compiling c code with risc-v gcc
April
Yes
Anonymous
Is there is any method to build cross platform apps in c++ Like flutter
Anonymous
Any free c++ backed hosting center ? No card , no money
Anonymous
Any free c++ backed hosting center ? No card , no money
Plz I urgent need it for code testing I can use gitpod but i need it working for atlest a week After it i will buy hosting on contabo
Null
this is some kubernetes alternative?
Anonymous
this is some kubernetes alternative?
Yes Docker is Kubernatives sucks
\Device\NUL
\Device\NUL
https://godbolt.org/z/zz7dGvd97 There's no $ See also https://github.com/riscv-non-isa/riscv-asm-manual/blob/master/riscv-asm.md
Karan - 1DS20IS042
hey guys
Danya🔥
hey guys
All 16869 members of the chat say hello to you
Anonymous
#ot @xorjik @thealidev
Persia
Any one has written the code for cannon matrix for size 200 in openmp?
Anonymous
Any one has written the code for cannon matrix for size 200 in openmp?
What is the problem? Ask your question directly
Adil
Hello
Adil
I am a JavaScript programmer. But I want to learn programming fundamental with C language. Any idea how long will take to learn C language?
Tokir0074
1 months is enough bro..
Adil
Only 1 month? Strange!
Tokir0074
But you have to do lots of practice
Tokir0074
Syntex are easier than java..
Danya🔥
I am a JavaScript programmer. But I want to learn programming fundamental with C language. Any idea how long will take to learn C language?
> But I want to learn programming fundamental with C language What do you mean by that and why do you want to do this?
Danya🔥
I meant memory allocation, data structure and algorithm.
Data structures and algorithms are the same across programming languages What is the goal you're pursuing by learning C?
Adil
I think C and Java is best for problem solving. And these are mid level language.
محمد
How solution angram one string for example (aaaabc cba)in cpp
Pavel
I am a JavaScript programmer. But I want to learn programming fundamental with C language. Any idea how long will take to learn C language?
It depends on definition of "learn a language". Learning the syntax of C is pretty fast, learning how to write safe and efficient code with minimal bugs can take a lot of time.
Mar!o
I am a JavaScript programmer. But I want to learn programming fundamental with C language. Any idea how long will take to learn C language?
Let’s be honest while C is a lot simpler than C++ learning and correctly using all the concepts like memory management, pointers and algorithms will take a lot of time and a lot of practice. Systems programming in general is hard when you only know JS - it’s a different world
BLESSED
I am a JavaScript programmer. But I want to learn programming fundamental with C language. Any idea how long will take to learn C language?
a lot more than js. It's not about the language but about its usage - like system/embedded programming etc (i'm not a C programmer)))
GOPA
hey can anyone suggest some of the best open source c++ project for beginners to study c++ projects
GOPA
qt is cool project
you mean qt framework
GOPA
yep
you mean https://github.com/qt/qtbase