Afoo_trader
Am new to it
Afoo_trader
Object of the problem.  1. To write a program will enable a user to compute numerical data and calculate the area of a triangle . 2.The program should be capable of haunt a numerical input interface capability of processing arithmetic data and calculations of an output interface to display result of processed data. 3.Input data required: Numerical data (integers) or floating point numbers. 4.Operations : Arthmetic and assignment operations. 5.Expected output is in numerical data which is the result of calculating the area of a triangle with input value given provided by users.
Afoo_trader
Am I correct
Dima
it seems nice
Afoo_trader
🥺 thank you ☺️
Afoo_trader
Anonymous
Is this book still valid to learn DS in c++? "Data structures and algorithm in c++" - adam drozdek
AmR
Any one Can help me with cmake and soci ?
Anonymous
nice set up bro
Anonymous
Hello, how can I get only 1 return value in multiple return values? Return weight, length, distance
Anonymous
In int main()
Luca
What you need to do?
Luca
How do i get ghe weight only?
Using functions? 💁🏻‍♂️
Luca
Using functions? 💁🏻‍♂️
And using the main just to evocate them and to I/o
Vinícius Pontes
Or using a struct
Anonymous
Hello, how can I get only 1 return value in multiple return values? Return weight, length, distance
I have a function. It returns these things. But, i want to print only the weight in int main().
Vinícius Pontes
How are you returning? A tuple?
Luca
I have a function. It returns these things. But, i want to print only the weight in int main().
Printf(“the weight is %i\n” ,[function name]([name of your variable]);
Luca
maybe I forgot something idk
Anonymous
Anonymous
How are you returning? A tuple?
I really dont know much about c. I use python im only helping a friend. And no not tuple
Anonymous
.
Ill try
Anonymous
maybe I forgot something idk
Only parameters on the function are availabke
AmR
Any help with CMake and SOCI ?
AmR
or any one know good cmake Chanel ?
Onkar
Can anyone help me
Onkar
I have an c++ problem ... I am not getting it
itsmanjeet
whats the meaning of - free(): double free detected in tcache 2
Mahajan
/get ide
Mahajan
he guys... is there also similar group like this one for python.
Anonymous
I'm trying to learn sockets, I plan to build a chat application eventually. But almost every available code is causing errors, the likes of which I haven't encountered before. Also, most of them are written for linux, but I need it in windows. Can anyone please help me transition this code to windows : https://www.geeksforgeeks.org/tcp-server-client-implementation-in-c
Luca
like if i do int *p; //i declare a pointer to integer //dynamic allocation adapted to contain an integer p=(int *) malloc(sizeof(int)); THEN i ADD free(p) i make the allocation empty
Luca
i think 😎👍
itsmanjeet
Ok, But I am getting a error while doing something similar in cpp [err: free() double free detected in tccache2]
Luca
you have to use structures
Luca
duuude ahahuahuahaja
Hermann
Or not allocated
itsmanjeet
You free memory just empty
means i am some where freeing unallocated memeory ?
Hermann
Y, it is same if you call free 2 times
itsmanjeet
ok thanks
Hermann
If you don't use free 2 times may you use wrong method, check syntax
Hermann
And pointer syntax
itsmanjeet
Ok
Anonymous
If Anybody here looking for free Data structure and Algorithm course then DM me..
Anonymous
Hello everybody
A.
/get cppbookguide
Shani
Can someone help me with homework in c pls?
Asdew
Just ask your question.
Shani
I need to do a function that gets an array and two numbers. One of the jump and other the number you put in the jump if the index : jump is equal to zero. I need to go over an array that I don't have the size by using pointers only. How can I do that?
Nur
I'm confused about this error. Can anyone figure it out?
Anmol
On line 12
Nur
Yeah, worked.. Thank you
Anonymous
I'm confused about this error. Can anyone figure it out?
also, why does your program have a bunch of new but no deletes
Pavel
As someone once said "What this code is actually doing is leaking"
Nur
I'm just learning allocation in heap
Nur
And that file extension .cc😂
I know .cpp😂😂😂
Anonymous
I'm just learning allocation in heap
in C++ this is just bad practice. all allocation and deallocation should be done in class constructors and destructors. there should be no naked new. if you need a built in type or a type whose constructor and destructor weren't designed for RAII on the free store, use std::unique_ptr (preferably) or std::shared_ptr
Pavel
I would add about std::array or std::vector instead of raw arrays.
Anonymous
He is just a beginner so ig there's nothing wrong with what he is doing
learning the wrong things first, then spending time correcting mistakes is a bad approach imo
Pavel
He is just a beginner so ig there's nothing wrong with what he is doing
That's like oldschool way of learning (learn the bad way, then learn the good way)
Anmol
That's like oldschool way of learning (learn the bad way, then learn the good way)
Nope. How else would you know about the heaps and what happens behind the scenes of smart pointers
Anonymous
Anonymous
after learning about classes and templates
Anmol
That's just a stretch
Pavel
Nope. How else would you know about the heaps and what happens behind the scenes of smart pointers
Well, you can first learn how to write correct code, then learn about heap, stack when you confident with it