当前位置: 动力学知识库 > 问答 > 编程问答 >

Changing Preprocessor Directives C++

问题描述:

So I am trying to use a really old library (last updated in 1999) that performs numerical integration over two-dimensional regions using cubature rules. The problem I'm encountering is that every single file in the library (both headers and source files, so probably 40 or more files) uses

#include <headerfile.h>

Instead of using

#include "headerfile.h"

Furthermore, it just uses

cout << "Whatever it is you want to print"

Instead of

std::cout << "Things for printing"

And finally when importing all the c++ standard library files it uses

#include <iostream.h>

Instead

#include <iostream>

Does anybody know of a convenient and efficient way of going through each file and changing this? Maybe some sort of shell script or something? I really do not want to go through all these files by hand. While we're on the topic, does anyone know of a good numerical integration package that isn't so ancient and integrates over any two-dimensional shape? I'm using this one because it handles integration over oddly shaped regions really well, and if I can get it to compile it will be perfect for my purposes. I looked at CUBA but their integration methods only integrate over the unit hypercube, and I need to integrate over triangles and rectangles and all sorts of strange shapes.

Thanks!!

分享给朋友:
您可能感兴趣的文章:
随机阅读: