Anonymous
O/p of this program
Anonymous
Ans plz
I_Interface
O/p of this program
we don't solve homeworks/exams
Anonymous
Anonymous
I gave a try. Please let me know if it works.
Anonymous
Which one?
Not good one actually Volgograd Technical
Dima
Oh
Salva
/opencv
Anonymous
Oh
Hm?
Dima
I thought you could say itmo or something haha
Anonymous
Artöm
btw inline keyword has nothing to do with inlining (as process)
Mihail
btw inline keyword has nothing to do with inlining (as process)
Well it actually does, but it's sorta compiler-dependant
Rostin
Guys I have to write a fibonacci sequence for tomorrow please help me I dont know what to do. I dont want to fail my class
Artöm
Take your time bro
Rostin
😅😅😅
Anonymous
Hlw
Anonymous
Main()
Anonymous
Hello temp()
Anonymous
Temapory
Anonymous
Guys, if i don't have Hyper-V Virual Machine in services and virtualization option in BIOS, then my CPU doesn't support virtualization ?
If you have no virtualization option in bios then you don't, but if you do have it, you can use any hypervisor not just hyper v, hyper-v is only available in pro and enterprise versions of windows, not in core versions
Kenneth
Hi friends! Whats the difference with Reinterpret_cast Dynamic_cast
Леонтий
Dynamic will check if casting can be made, and reinterpret not
Kenneth
Ic thank you!
Pavel
Hi friends! Whats the difference with Reinterpret_cast Dynamic_cast
dynamic_cast is done at runtime and is being used for casting pointers in class hierarchy. E.g. you have class B derived from A. Then you create B on the heap but store it as a pointer to A. Then you can use dynamic_cast to cast it back to pointer to B. Dynamic cast can fail, if it fails it just returns nullptr. reinterpret_cast is done at compile time and it's used to reinterpret some part of memory of one type as another type. Reinterpret cast the is most unsafe cast (except for C-style cast), as it will not warn you if you break your memory. Also it implementation-defined, so you can have different results on different platforms (as the memory representation of the same types can vary). So use static_cast or dynamic_cast instead of reinterpret_cast when possible.
Anonymous
Hey
Riri
Hey
Anonymous
Is it possible to have a global target_link_libraries in cmake
Anonymous
For a multiproject setup
Anonymous
As now i have to multiple times do it for each project
Francisco
Is it possible to have a global target_link_libraries in cmake
As you can tell, the "target" part of the command specifies that it acts in just that target. To make it global, just use the set command to define a global variable. I don't know exactly how, but there must be answers in Stack Overflow
Anonymous
Please tell me baalguruswamy book is best or not for c and c++ programming
Anonymous
🆗
BEN
Hello I'm new here
Anonymous
Hi, Rose Your Bot or human
BEN
Thanks
Talula
Tell me
Rose is the sweetest girl here... she welcomes everyone..
Anonymous
anyone here doing flash..??
Talula
anyone here doing flash..??
Flash light? Flash like (sex stuff), flash like processor, flash like that stupid thing everyone got rid of back in 2010?
Anonymous
anyone here doing flash..??
No one does 1) don't ask to ask, just ask 2) it is offtopic, #ot
Dima
/warn promotion
Rashi
Does anyone know how to store elements of dynamic int array (created using malloc) into a string
Rashi
#include<stdio.h> #include<string.h> #include<stdlib.h> int main() { int *ptr,*p,i,n,m,k,s; char str[50]={0}; scanf("%d",&n); ptr = (int*) calloc(n , sizeof(int)); p=ptr; for(i=0;i<n;i++){ k=i*i; *ptr=k; ptr++; } s=n*n; for ( i = 0; p[i ]<=s; i++) { m += sprintf (&str[m], "%d", p[i]); } puts(str); return 0; }
Rashi
This is the program I am trying to execute but it's crashing on run time ... Any help please ??
Dima
What the hell
Yurii
Looks strange. What do you want to do?
Yurii
In general you must check pointer after calloc().
Rashi
Actually my real program is to count number of certain digit(entered by user) in list of squares upto a particular number (entered by the user)
Rashi
In general you must check pointer after calloc().
I did that ..and it was working fine ...so I removed it
Yurii
Did you try to run it with debugger?
Rashi
Did you try to run it with debugger?
Nope ... I don't know debugging
Yurii
Also you have uninit local variable m
Yurii
What value does m have when this string "m += sprintf (&str[m], "%d", p[i]);" run first time?
Yurii
before first iteration
Yurii
Yes
Yurii
Are you sure?
Rashi
Yeah
Yurii
try to google "local variables C++"
Rashi
Just now I have initialised m in my system
Yurii
The same story
Rashi
The same story
Now it's not crashing but giving output 01
Rashi
Output is incorrect
Yurii
what value do you enter?
Rashi
5