修订版 | f369f282074e3351415a9423cb48ebaf4164eb5b (tree) |
---|---|
时间 | 2020-02-17 04:12:21 |
作者 | i.bountouris <vagiamouris1994@gmai...> |
Commiter | i.bountouris |
unique pointer
@@ -0,0 +1,19 @@ | ||
1 | +#include<iostream> | |
2 | +#include<string> | |
3 | +#include<vector> | |
4 | +#include<memory> | |
5 | +#include<set> | |
6 | + | |
7 | +void giannis(std::unique_ptr<int> &pointer){ | |
8 | + | |
9 | + printf("hello john from here %d\n", *pointer); | |
10 | + | |
11 | +} | |
12 | + | |
13 | +int main(){ | |
14 | + | |
15 | + std::unique_ptr<int> pointer(new int(10)); | |
16 | + | |
17 | + giannis(pointer); | |
18 | + | |
19 | +} |
@@ -1,2 +1,4 @@ | ||
1 | 1 | SOURCES += \ |
2 | 2 | practise.cpp |
3 | + | |
4 | +CONFIG += console |
@@ -1,6 +1,6 @@ | ||
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | 2 | <!DOCTYPE QtCreatorProject> |
3 | -<!-- Written by QtCreator 4.9.2, 2020-02-16T18:57:57. --> | |
3 | +<!-- Written by QtCreator 4.9.2, 2020-02-16T20:52:09. --> | |
4 | 4 | <qtcreator> |
5 | 5 | <data> |
6 | 6 | <variable>EnvironmentId</variable> |
@@ -316,6 +316,7 @@ | ||
316 | 316 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> |
317 | 317 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> |
318 | 318 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> |
319 | + <value type="bool" key="RunConfiguration.UseTerminal">true</value> | |
319 | 320 | <value type="QString" key="RunConfiguration.WorkingDirectory"></value> |
320 | 321 | <value type="QString" key="RunConfiguration.WorkingDirectory.default">C:/Users/Giannis/Desktop/Qt_projects/practise_repository/build-tonystark-Desktop_Qt_5_13_0_MinGW_64_bit-Debug</value> |
321 | 322 | </valuemap> |