Message from C, C++ talks

June 2019

— Gotta love golang

— Wtf 😂😂

— This Rose is broken. Get the new one 😂

— Hi

— 

#include <iostream>
#include <math.h>
template <typename Method, typename F, typename Float>
double integrate(F f, Float a, Float b, long steps, Method m)
{
double s = 0, h = (b-a)/steps;
for(int i = 0; i < steps; ++i)
{
s += m(f, a + h*i, h);
}
return h*s;
}
class simpson
{
public:
template <typename F, typename Float>
double operator()(F f, Float x, Float h) const
{
return (f(x) + 4*f(x+h/2) + f(x+h))/6;
}
};

double f(double x)
{
return (log(1+x)*log(1-x)*log(x)*log(x));
}

int main()
{
double s = integrate(f, 0.00000000001, 0.99999999999, 10000000, simpson());
std::cout.precision(17);
std::cout << "s = " << std::fixed << s << "\n";
return 0;
}


can this be made more efficient?

— Hello everyone, i'm new to c ;
I want to understund pointers ;
do u have idea for little project using pointers ? ;
maybe project with more things also ;
all i know now is to set variables and print them 😂 ; but i want to learn ;

Message permanent page

— Dynamic arrays are the best way to begin

— For the start u can set a pointer for variable

— Sure i did that i understund fast that's why i'm looking for little project

— I'm coming from python programming

— Hm, try to watch forward list realization

— Thanks a lot !
I'm interesting to 'translate' ( to human laungage ) binaries file like mice in linux ( mouse ) and things like that.
maybe it's good point to start ?

Message permanent page

— Everything in your hands)

— Hey there I'm a computer science student n I will someone to teach me how to write programs

— Isnt your professor gonna teach you that?? 🤔