Skip to content

Commit a85cb16

Browse files
committed
testprog
1 parent bab49d6 commit a85cb16

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

bin2cpp20/testprog/main.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,11 @@
55
#include <string>
66

77
int main(int argc, char **argv) {
8-
8+
std::locale::global(std::locale(""));
9+
std::wcout.imbue(std::locale());
910
if(argc == 1) {
10-
for(const auto &i : bin_arr) {
11-
std::cout << i;
12-
}
1311
for(int i = 0; i < var2_length; ++i) {
14-
std::wcout << var2[i] << "\n";
12+
std::wcout << L"->" << var2[i] << L"\n";
1513
}
1614
} else if(argc == 2) {
1715
std::fstream file;
@@ -20,4 +18,4 @@ int main(int argc, char **argv) {
2018
file.close();
2119
}
2220
return 0;
23-
}
21+
}

bin2cpp20/testprog/test2.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
#define __ARR_H_HPP_var2
33
#include<string>
44

5-
inline const std::wstring var2[] = {L"CXXFLAGS = -std=c++20 ",L"LDFLAGS = ",L"CPP_FILES := $(wildcard *.cpp)",L"OBJ_FILES := $(CPP_FILES:.cpp=.o)",L"OUTPUT_NAME = bin2cpp20",L"DEPS := $(wildcard *.hpp)",L"%.o: %.cpp $(DEPS) ",L" $(CXX) $(CXXFLAGS) -c $< -o $@",L"$(OUTPUT_NAME): $(OBJ_FILES)",L" $(CXX) $^ -o $@ $(LDFLAGS)",L"all: $(OUTPUT_NAME)",L"install: all",L" cp $(OUTPUT_NAME) /usr/local/bin",L"clean:",L" rm -f $(OUTPUT_NAME) $(OBJ_FILES)",L".PHONY: all install clean"};
6-
inline unsigned long var2_length {16};
5+
inline const std::wstring var2[] = {L"👍👍👍👍👍👍👍👍👍👍",L"👍👍👍",L"👍👍",L"👍👍",L"👍"};
6+
inline unsigned long var2_length {5};
77

88

99
#endif

0 commit comments

Comments
 (0)