Shvmtz
Visual studio is best in my opinion
Yeah..but I'm following c/c++ with turbo C++ 😐 as per my syllabus
Ashish Bhushan
So what?
Ashish Bhushan
Code remains same dude
Shvmtz
So what?
There are some differences in code statements
Ashish Bhushan
I am also a student... I am doing the same
Anonymous
Yeah..but I'm following c/c++ with turbo C++ 😐 as per my syllabus
The syllabus is old bro, the books and everything is completely old, we have to be in sync with latest news and tech..
Dima
CLion, Qt creator
Ashish Bhushan
There are some differences in code statements
A little bit like you don't need to use include<conio.h> and functions like getch() and all
Ashish Bhushan
Rest it's the same
Shvmtz
Yup
Ashish Bhushan
Once you will use it.. You will get to know.. How easy is to use visual studio code and there will be no problem in hsing turbo c++
Shvmtz
I've VS code
Ashish Bhushan
*using
Ashish Bhushan
I've VS code
Good then just install sime add ons... Like intellisense and code runner
Ashish Bhushan
And compiler is must obv... Install gcc compiler also
Shvmtz
For college projects or practical programs, i use dev C or turbo c++
Shvmtz
Ashish Bhushan
No you have to install compiler seperatley bruh😂😂
Shvmtz
I used intelliSense debugger
Rohan
Yes.. VS code has everything.😂
c/c++ extension make it IDE
Ashish Bhushan
That's a different thing
Wisenky
also this doesnt prints anything why ? #include "stdio.h" #include "stdlib.h" typedef struct { int size; int id; int tip; float x1; float x2; float y1; float y2; }str; int main() { str *block1; block1->size = 10; block1 = malloc( (block1->size ) * sizeof(str)); (block1+(1*sizeof(block1)))->x1 = 10.0; (block1+(2*sizeof(block1)))->x1 = 15.2; (block1+(3*sizeof(block1)))->x1 = 4.5; printf("1 . x1 of block1 : %f",(block1+(1*sizeof(block1)))->x1); printf("2 . x1 of block1 : %f",(block1+(2*sizeof(block1)))->x1); printf("3 . x1 of block1 : %f",(block1+(3*sizeof(block1)))->x1); free(block1); return 0; }
Dima
str *block1; block1->size = 10;
Dima
you are setting a size before block1 initialization
Wisenky
Dima
no, it doesn’t work that way
Dima
at least it shouldn't
Wisenky
really :(
Wisenky
no, it doesn’t work that way
It doesnt give an error
Wisenky
just print anything
Wisenky
oh
Wisenky
#include "stdio.h" #include "stdlib.h" typedef struct { int size; int id; int tip; float x1; float x2; float y1; float y2; }str; int main() { str *block1; block1 = malloc( sizeof(str) ); block1->size = 10; block1 = realloc(block1 , block1->size * sizeof(block1)); (block1+(1*sizeof(block1)))->x1 = 10.0; (block1+(2*sizeof(block1)))->x1 = 15.2; (block1+(3*sizeof(block1)))->x1 = 4.5; printf("\n1 . x1 of block1 : %f",(block1+(1*sizeof(block1)))->x1); printf("\n2 . x1 of block1 : %f",(block1+(2*sizeof(block1)))->x1); printf("\n3 . x1 of block1 : %f",(block1+(3*sizeof(block1)))->x1); free(block1); return 0; }
Wisenky
this works thanks :)
Shvmtz
Hey.. Tell me those extensions code snippets for C/C++ in VS code that u're talkin 'bout
Anonymous
Thanks
Rohan
Read documentation to setup it...
MᏫᎻᎯᎷᎷᎬᎠ
So You have a reference and a variable The first refers to the second Now we all do know that any changes of one of them, affects the other How about we go far more Any changes of the value, affects in the reference based on a given function Like this one: int a = 7; int& r = a; a = 1; //r becomes automatically some how to 10 based on a given function Any idea about the implementation?🤔
Anonymous
Covid-19, lel
klimi
you have been infected *cough cough*
Anonymous
C++
Marián
eyo guys fast c++ help would come handy
Marián
i have std unordered_map and want to use my custom struct as key
Marián
but it needs to implement hash comparer in order to make hash from that struct and use it as key
Marián
how can i implement this comparer? never done this in c++
Marián
Marián
ah i am idiot
klimi
rubber duck haha
Marián
love speaking to it
klimi
geez programmers are weird
Marián
why
klimi
why
nothing, just go talk to your rubber ducky
𓆉 𝖙𝖚𝖗𝖙𝖑𝖊𝕶𝖎𝖓𝖌 ࿐
i'm new in coding... i just created a program in C but it's not executing,.. showing some errors.. can anyone explain what mistake i'm making...
𓆉 𝖙𝖚𝖗𝖙𝖑𝖊𝕶𝖎𝖓𝖌 ࿐
#include<stdio.h> #include<conio.h> void main() { printf ("this is the program for finding square and cube of a number"); int a, b, c; b=a*a; c=a*a*a; printf ("enter the first number: %d", a); scanf ("%d", &a); Printf ("the Square of the number is %d", b); Printf ("The cube of the number is %d", c); }
𓆉 𝖙𝖚𝖗𝖙𝖑𝖊𝕶𝖎𝖓𝖌 ࿐
int main() { printf ("this is the program for finding square and cube of a number"); int a ; printf ("enter the first number: %d", a); scanf ("%d", &a); int b, c; b=a*a; c=b*a; Printf ("the Square of the number is %d", b); Printf ("The cube of the number is %d", c);
klimi
Its better
professor
dis this a valid integer overflow ? https://dpaste.org/Zuj8
Patrick
I have already!
Anonymous
/warn ad
Rania
Hi, is there any OpenCV group I can join ? Specifically OpenCV with C++ (not python) ? I've been having trouble integrating OpenCV+OpenGL and C++ with a webcam.
Katlego
Hi can I HV visual studio 2013 for coding apk
Asdew
Sorry for that, I didn't mean that, I really hate the location of the voice message button in Depecher.
Hello Please who knows how I can make @MissRose_bot take records of certain message containing a keyword. Like for it to notice that a certain member has done a task when he sends the message with the keyword
Telegram bot api
Sorry... please clarify
klimi
Sorry... please clarify
Use telegram bot api to communicate with telegram servers
MilkBeforeCereal
Make your own bot
klimi
Oh yes, I have read the message wrongly, thanks jesus