2月18日,LG发布了三款K系列新机,分别是K61、K51S和K41S,它们均搭载了后置四摄像头。三款新机均配备了6.5英寸FullVision挖孔屏,其中K61配备了FHD+屏幕,其他两款只配备了HD+屏幕,三款均支持后置指纹识别,并且内置4000mAh锂电池,而且还支持MIL-STD-810G军规采购认证,并具有DTS:X沉浸式立体环绕声效。
K61和K51S均搭载了主频为2.3GHz的八核处理器,其中K61配备4GB RAM+64GB/128GB ROM,K51S配备3GB RAM+64GB ROM;K41S搭载2.0GHz八核处理器,配备3GB RAM+32GB ROM,三款都支持最大2TB MicroSD卡扩展。
摄像方面,K61配备了4800万像素主摄+800万像素超广角+200万像素微距+500万像素深度传感器;K51S则配备了3200万像素主摄+500万超广角+200万微距+200万深度传感器;K41S也同样配备了后置四摄,分别为1300万像素主摄+500万超广角+200万微距+200万深度传感器.此外,三款机型均支持双频WiFi 5无线,蓝牙5.0、NFC,底部采用USB-C接口。三款新机均定于2020年第2季度在美洲市场首发,稍后会在全球市场上市,价格尚未公布。
K61和K51S均搭载了主频为2.3GHz的八核处理器,其中K61配备4GB RAM+64GB/128GB ROM,K51S配备3GB RAM+64GB ROM;K41S搭载2.0GHz八核处理器,配备3GB RAM+32GB ROM,三款都支持最大2TB MicroSD卡扩展。
摄像方面,K61配备了4800万像素主摄+800万像素超广角+200万像素微距+500万像素深度传感器;K51S则配备了3200万像素主摄+500万超广角+200万微距+200万深度传感器;K41S也同样配备了后置四摄,分别为1300万像素主摄+500万超广角+200万微距+200万深度传感器.此外,三款机型均支持双频WiFi 5无线,蓝牙5.0、NFC,底部采用USB-C接口。三款新机均定于2020年第2季度在美洲市场首发,稍后会在全球市场上市,价格尚未公布。
内联函数
提高执行效率,无需调到另一个位置再跳回。
特性
●函数声明前和定义前加上关键字inline。
square( )计算参数平方
#include
using namespace std;
inline double square(double x)
{
return x * x;
}
int main()
{
double a, b;
double c = 13.0;
a = square(5.0);
b = square(4.5 + 7.5);
cout << "a=" << a << "," <<"b="<< b << endl;
cout << "c=" << c;
cout << ",c square=" << square(c++) << endl;
cout << "Now c=" << c << endl;
return 0;
}
提高执行效率,无需调到另一个位置再跳回。
特性
●函数声明前和定义前加上关键字inline。
square( )计算参数平方
#include
using namespace std;
inline double square(double x)
{
return x * x;
}
int main()
{
double a, b;
double c = 13.0;
a = square(5.0);
b = square(4.5 + 7.5);
cout << "a=" << a << "," <<"b="<< b << endl;
cout << "c=" << c;
cout << ",c square=" << square(c++) << endl;
cout << "Now c=" << c << endl;
return 0;
}
流输入输出重载(只能友元形式)
#include
#include
using namespace std;
class Point
{
private:
double x, y;
public:
Point(double px=0,double py=0):x(px),y(py){}
double distance(Point b)const;
friend istream& operator>>(istream& is, Point& b);
friend ostream& operator<<(ostream& os, Point& b);
};
double Point::distance(Point b)const
{
return sqrt((x - b.x) * (x - b.x) + (y - b.y) * (y - b.y));
}
istream& operator>>(istream& is, Point& b)
{
is >> b.x >> b.y;
return is;
}
ostream& operator<<(ostream& os, Point& b)
{
os << "(" << b.x << "," << b.y << ")" << endl;
return os;
}
void main()
{
Point a, b;
cin >> a >> b; //中间用空格做分隔符
cout << a << b << "两点距离为:" << a.distance(b) << endl;
}
#include
#include
using namespace std;
class Point
{
private:
double x, y;
public:
Point(double px=0,double py=0):x(px),y(py){}
double distance(Point b)const;
friend istream& operator>>(istream& is, Point& b);
friend ostream& operator<<(ostream& os, Point& b);
};
double Point::distance(Point b)const
{
return sqrt((x - b.x) * (x - b.x) + (y - b.y) * (y - b.y));
}
istream& operator>>(istream& is, Point& b)
{
is >> b.x >> b.y;
return is;
}
ostream& operator<<(ostream& os, Point& b)
{
os << "(" << b.x << "," << b.y << ")" << endl;
return os;
}
void main()
{
Point a, b;
cin >> a >> b; //中间用空格做分隔符
cout << a << b << "两点距离为:" << a.distance(b) << endl;
}
✋热门推荐