?? rtn_ref.cpp
字號(hào):
#include <iostream.h>
struct book {
char author[64];
char title[64];
float price;
};
book library[3] = {
{"Jamsa", "Jamsa's 1001 C/C++ Tips", 39.95},
{"Wyatt", "1001 Word for Windows Tips", 39.95},
{"Jamsa", "Jamsa's 1001 Windows Tips", 39.95}};
book& get_book(int i)
{
if ((i >= 0) && (i < 3))
return(library[i]);
else
return(library[0]);
}
void main(void)
{
cout << "About to get book 0\n";
book& this_book = get_book(0);
cout << this_book.author << ' ' << this_book.title;
cout << ' ' << this_book.price;
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -