-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathP12.cpp
More file actions
62 lines (47 loc) · 1016 Bytes
/
P12.cpp
File metadata and controls
62 lines (47 loc) · 1016 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
* =====================================================================================
*
* Filename: P12.cpp
*
* Description:
*
* Version: 1.0
* Created: 2016年03月31日 11时27分45秒
* Last Modified: 2016年03月31日 11时27分45秒
* Revision: none
* Compiler: gcc
*
* Author: zt (),
* Organization:
*
* =====================================================================================
*/
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
template<typename T>
bool Make2dArray ( T**& a, int numberOfRows, T*& b )
{
a = new T* [numberOfRows];
for ( int i = 0; i < numberOfRows; ++i )
a[i] = new T [b[i]];
return false;
}
class a
{
public:
a() {}
~a() {}
public:
friend std::ostream& operator<< ( std::ostream& out, const a& x )
{
out << "asd:" << 1.2 << std::endl;
return out;
}
};
int main ( int argc , char* argv[] )
{
a aa;
std::cout << aa;
return 0;
}