这是头文件:employee.h
#ifndef EMPLOYEE_H
#define EMPLOYEE_H
#include <iostream>
#include <string>
using namespace std;
class Employee {
public:
Employee(const string &first, const string &last)
Run Code Online (Sandbox Code Playgroud)
重载的构造函数
: firstName(first),
Run Code Online (Sandbox Code Playgroud)
firstName重载的构造函数
lastName(last)
Run Code Online (Sandbox Code Playgroud)
lastName重载的构造函数
{ //The constructor start
++counter;
Run Code Online (Sandbox Code Playgroud)
它为每个创建的对象增加一个加号;
cout << "Employee constructor for " << firstName
<< ' ' << lastName << " called." << endl;
}
~Employee() {
Run Code Online (Sandbox Code Playgroud)
析构函数cout <<"~Workee()调用"<< firstName <<"<< lastName << endl;
返回每个对象的名和姓
--counter;
Run Code Online (Sandbox Code Playgroud)
反减一
}
string getFirstName() const {
return firstName;
}
string getLastName() const {
return lastName;
} …Run Code Online (Sandbox Code Playgroud) 我在笔记本电脑上安装了ADT Bundle.我有ubuntu 13.10,但是当我打开ADT时,我看到了这样的消息:
Unexpected exception 'Cannot run program "/home/.../Descargas/adt-bundle-linux-x86_64 20131030/sdk/platform-tools/adb":
error=2, No existe el archivo o el directorio' while attempting to get adb version from '/home/.../Descargas/adt-bundle-linux-x86_64-20131030/sdk/platform-tools/adb'
[2013-12-25 16:20:14 - adb] Unexpected exception 'Cannot run program "/home/.../Descargas/adt-bundle-linux-x86_64-20131030/sdk/platform-tools/adb":
error=2, No existe el archivo o el directorio' while attempting to get adb version from '/home/.../Descargas/adt-bundle-linux-x86_64-20131030/sdk/platform-tools/adb'
Run Code Online (Sandbox Code Playgroud)
这是我第一次在android上安装和开发,所以,我不知道该怎么做.有人能帮我吗?
我在过去的两个月里一直在编写测试(用JavaScript).并且,我习惯检查模块是否具有某些属性.
例如:
// test/foo.js
const Foo = require('../lib/foo');
const Expect = require('chai').expect;
describe('Foo API', () => {
it('should have #do and #dont properties', () => {
Expect(foo).to.have.property('do')
.and.to.be.a('function');
Expect(foo).to.have.property('dont')
.and.to.be.a('function');
});
});
});
Run Code Online (Sandbox Code Playgroud)
而且,我一直在想我是否正在做正确的事情.只是想知道一些事情:
这种模式是"正确的"吗?
如果它不"正确"?
它甚至有意义吗?