原创 Qt模塊和工具簡介
Qt模塊和工具簡介Qt是一個跨平臺的C++應用程序開發框架。Qt模塊:1、圖形用戶接口:Qt的圖形用戶接口的基礎是QWidget。Qt中所有類型的GUI組件如按鈕、標籤、工具欄等都派生自QWidget,而QWidget本身則爲QObject
原创 Qt程序錯誤記錄
Qt程序錯誤記錄1、有的程序用到setMainWidget()函數,如果你用的Qt版本是4.0以上的會報錯如下:error: ‘class QApplication’ has no member named ‘setMainWidget’錯
原创 成年人消耗卡路里
成年人消耗卡路里計算://成年人消耗卡路里 #include<iostream> double metabolism(double weight); double activity(int degree,double weight,int
原创 Credit Card Interest-餘額利息
Credit Card Interest,餘額利息//Credit Card Interest-餘額利息 #include<iostream> int main() { using namespace std; long
原创 mile for gallon 汽車省油
計算汽車省油,用英里每加侖比較,允許重複比較//mile for gallon 汽車省油 #include<iostream> const double GALLON = 0.264179; double milepergallon(
原创 overload abs-重載絕對值函數
overload abs-重載絕對值函數//overload abs-重載絕對值函數 #include<iostream> using namespace std; int abs(int n); //long abs(long n)
原创 Decode-譯碼
Decode-譯碼//Decode-譯碼 #include<iostream> #include<cstring> #include<cstdlib> #include<cctype> using namespace std; void
原创 overload max-重載max函數
overload max-重載max函數//overload max函數 #include<iostream> double max(double a,double b); double max(double a,double b,dou
原创 Ubuntu12.04嵌入式交叉編譯環境arm-linux-gcc搭建過程,圖解
安裝環境 Linux版本:Ubuntu 12.04 內核版本:Linux 3.5.0 交叉編譯器版本:arm-linux-gcc-4.4.3 這個版本的交叉編譯器我已經上傳到了資源上,可以隨便下載,點此下載安裝前的絮叨
原创 Service Lane
Service Lane#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespac
原创 Utopian Tree
Utopian Tree#include <iostream> using namespace std; int height(int n) { if(n == 0) return 1; else
原创 Value of Stock Holdings
Value of Stock Holdings// Value of Stock Holdings #include<iostream> double conversion(int integer,int moloffractional
原创 string<C++標準庫>的函數
string<C++標準庫>的函數函數構造表示string::string(構造)string::~string(析構)string::operator= - 賦值string::assign – 賦值string::get_allocat
原创 近似pi
#include<iostream> #include<cmath> using namespace std; int main() { int n; char ans; double pi;
原创 The Monty Hall Problem-蒙特霍問題
//The Monty Hall Problem #include <iostream> #include <cstdlib> // Needed for random numbers using namespace std; // =