Skip to content

Commit 49d737a

Browse files
committedMay 4, 2023
Change to write import std; for modules
1 parent ffbf9b3 commit 49d737a

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed
 

‎scripts/extract-code.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
// extract-code.cpp : Scan a Markdown file for C++ programs
22

3-
import std.core;
4-
import std.regex;
3+
#include <string>
4+
#include <sstream>
5+
#include <regex>
6+
#include <vector>
7+
#include <iostream>
8+
#include <fstream>
59
using namespace std;
610

711
int main(const int argc, const char **argv) {
@@ -41,7 +45,7 @@ int main(const int argc, const char **argv) {
4145
while (line != "```") {
4246
header << line << '\n';
4347
if (line == "using namespace std;") {
44-
module << "import std.core;\n";
48+
module << "import std;\n";
4549
}
4650
if (line.substr(0, 8) != "#include") {
4751
module << line << '\n';

0 commit comments

Comments
 (0)