Given three files: class.h, class.cpp and main.cpp containing small C++ project, which sentences are TRUE if you attempt to compile and run the program? Assume that the whole compiling environment is properly set.
// File: main.cpp
#include
#include "class.h"
using namespace std;
int main()
{
A
cout << a.getV() << endl;
return 0;
}
//File: class.h
#ifndef _CLASS_
#define _CLASS_
template
class A {
T_v;
public:
A() {}
A(T v);
T getV();
};
#endif
//File: class.cpp
#include "class.h"
template
A
template
T A
Suggested Answer: D
Get Premium CPP Questions
as Interactive Web-Based Practice Test or PDF
Real Exam Format
Detailed Explanations
Instant Access
Get Your Practice Test
0 comments · newest first
Currently there are no comments in this discussion, be the first to comment!