Alex
you wrote "never" about "new"
Артём
"...maintained by malloc... may not be the same as... maintained by new" — in what cases may it not be the same?
Vlad
Vlad
And it can allocate through anything
Selmon boi
What can be reason for not upgrading turbo c++ UI still using 16-bit color..
Still it is being used in educational institutions why??
Anonymous
Vlad
Vlad
It just takes a bit of time and effort to migrate
Anonymous
/warn Ali Mtulu PMing
Bs
/warn
Anonymous
Hello everyone.
klimi
Sharukh
Modal dialog in mfc works well with windows 8 and 8.1 but not with windows 10... Is that microsoft issue??
Sharukh
Modal dialogs in win8.1 becomes modeless in win 10
Z0OM
class A has a map of <unsigned int, void*>
which maps id with corresponding B<T>.
class B is a template class and inherits from A.
it has a private member id.
now i need a function which takes an id and returns a pointer to B<T>.
so i can do something like auto b = getById(1);
i am unable to write such a function.
pls suggest . thankyou
Z0OM
sorry my bad. message edited.
Z0OM
no
Z0OM
yes :/
Z0OM
not a singleton class .poor design i know
Bojan_Krdemn
Hi! I try to launch a small project in the debug mode
It has a grid class - matrix of char
When i run the project in the debug mode
execution crashes with exception Grid::operator [][]: (1095343392, 285277072) is outside of valid range []
Bojan_Krdemn
i am pretty sure that i didn't call any out of bond member of Grid cause
the call to the grid elements in the project is done only inside a loop
Bojan_Krdemn
for r< grid.heigth()
for c < grid.width()
Vlad
Vlad
And it literally can be anything
Bojan_Krdemn
well the debugger crashes. when i launch the project it works
Bojan_Krdemn
but the debugger crashes
Bojan_Krdemn
in release mode - works.
debug mode - out of bonds exception
Bojan_Krdemn
https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1126/materials/cppdoc/Grid-class.html
Vlad
Vlad
What OS are you at?
Bojan_Krdemn
Windows
Bojan_Krdemn
UB what?
Muhammad Saad
How to make a very simple C++ program to find the factorial of any number using only if statement.
I googled it and didn't find anything. Kindly help
klimi
factorial of any number?
olli
V01D
How many manus are there?
Feel like I've seen this a thousand times
Vlad
klimi
Sasuke
😂😂😂
klimi
well mathematics is a prerequisments for programming... you won't get far without mathematics
klimi
oh factorial ... my bad... i am doing multiple things at once c:
klimi
the same thing applies to factorials as well
dj
klimi
no... not at all... i am not talking about addition and multiplication.... the mathematics logic is more important than some addition... i mean... addition is not enough
V01D
klimi
i thought we are talking about basics and about c/c++.... but.... whatever...
Mohammad
Hello friends
I am an Iranian programmer and I like to work with programmers from other countries.
I can work at a lower price than others.
Does anyone like to work together?
If you like, you can send me a private message
dj
promoting group is allowed here ?
V01D
promoting group is allowed here ?
No, I pointed him to a group.
I usually would not do this but there is no group like this one on telegram.
It is the only freelancer group that connects peers that I know of
dj
V01D
Yeah, that is true
Dima
OH YES FINALLY TIME TO WARN
Dima
V01D
Rip.
The message is gone 😏
dj
Mohammad
I have trouble finding a job ... can you help me?
klimi
klimi
Then probably try some other group (and maybe try looking for some freelancing websites)
Anonymous
#nousingstd
olli
competitive programming often leads to bad practices
Chris
Hey guys, would anyone be willing to take a look at my source code and help me understand using call-by-value? I have an assignment due tomorrow at 9am so I cannot reach out to the professor at this time.
vinícius*
send it in
Anonymous
Chris
ok great . Gimme just one sec to take a screenshot
Anonymous
Chris
my apologies everyone. I'm new to the chat and didn't know any better guys
Anonymous
ᴴᴰ Donald Duck & Chip and Dale Cartoons - Disney Pluto, Mickey Mouse Clubhouse Full Episodes # 7
https://youtu.be/5A_s9kuIagU
Chris
Ok so after reading the rules it appears that it is appropriate to post screenshots of my source code and ask for help in the main chat as long as I've taken the effort to try and figure out the answer on my own and through using other resources like search engines and Stackoverflow(which I have done already)?
vinícius*
I think he just meant that you should send the source code in a text format rather than a screenshot
Chris
ah gotcha
Chris
#include<iostream>
#include<cmath>
using namespace std;
//Let’s declare first any global constant, if any required
// This variable is defined globally, i.e. it is known to all functions in this program as PI
// To declare a global constant you must write it outside the main() function
const double PI = 3.14159;
//Now we declare any programmer defined function
double cross_area(double r); // Function prototype for function cross_area
double side_area(double r, double h); // Function prototype for function Side_area
// Start defining the main function
int main(void)
{
double h, r; //variables local to the main function
cout « "Enter the radius and the height of the cylinder in Cm <Enter> ";
cin » r » h;
cout « endl;
cout « "Before I do any computation or call any function, I want to let you know that \n";
cout « "you have entered r = " « r « " and h = " « h « "." « endl;
cout « "I am planning to use inch, thus in the first function, I will convert r, and " « endl;
cout « "in the second one I will convert h \n";
cout « "The cross section area of the cylinder is " « cross_area(r) « " inch-sqr" « endl;
cout « "The side area of the cylinder is " « side_area(r,h) « " inch-sqr \n\n";
return 0;
}
// Definition of all programmer defined functions
double cross_area(double r)
{
//Cross section area includes the disks at the bottom and the top
r = r * 0.3937; // converting r to inch
return 2*PI*pow(r,2);
}
double side_area(double r, double h)
{
double area; //variable local to side_area function
h = h * 0.3937; // converting h to inch
area = 2*PI*r*h;
return area;
}
vinícius*
@admin
Chris
I know when using the input values of 2 and 10 I should return the side area of a cyclinder to be 19.4778 but I don't fully grasp the concept of call-by-value as I just learned about it this week and I cannot determine where the mistake is. Any help or advice would be appreciated
Anonymous
sorry by mistake
Sharukh
Sharukh