NLESC-JCER / run-cpp-on-web

cpp2wasm blogs
Apache License 2.0
6 stars 2 forks source link

Minor remarks #108

Closed daanboer closed 4 years ago

daanboer commented 4 years ago

Thank you for creating this series of blog posts, they have already been very helpful. I want to share some minor remarks that I encountered while working with the posts.

1. WebAssembly

C++ related

It is quite unconventional to include a .cpp file (and it can e.g. lead to "multiple definition" errors). This can be solved by creating a file algebra.h that declares the functions:

#ifndef ALGEBRA_H
#define ALGEBRA_H

float equation(float x);
float derivative(float x);

#endif

then include this file from algebra.cpp and newtonraphson.cpp.

3. React

Minor remarks

4. Visualizations

C++ related

sverhoeven commented 4 years ago

All suggestions have been incorporated into #113 PR, please have a look if the implementation is OK.