原创 Source Insight 4.0集成格式化工具AStyle

1. 下載AStyle.exe工具,官網地址:https://sourceforge.net/projects/astyle/files/      下載後解壓縮文件,進入AStyle_3.1_windows\AStyle\bin目錄下取

原创 地理座標系與投影座標系的區別

1、地理座標系         首先理解地理座標系(Geographic coordinate system),Geographic coordinate system直譯爲地理座標系統,是以經緯度爲地圖的存儲單位的。很明顯,Geogra

原创 C/C++中內存管理

一、內存分配方式   內存分配方式有三種:1、從靜態存儲區域分配。內存在程序編譯的時候就已經分配好,這塊內存在程序的整個運行期間都存在。例如全局變量,static變量。 2、在棧上創建。在執行函數時,函數內局部變量的存儲單元都可以在棧上創

原创 快速排序算法實現

#include <iostream> #include <cstdlib> using namespace std; void quickSort(int *data, int length, int start, int end)

原创 實現字符串(char*)的前N個字符放到後面

/* 實現字符串(char*)的前N個字符放到後面 */ #include <iostream> using namespace std; char* func(char *str, int N) { if (NULL == str

原创 用OpenGL實現 中點劃線法

#include "GL/glut.h" #include "stdio.h" #include "math.h" int xs, ys, xe, ye; void MidpointLine(int x0, int y0, int x

原创 用OpenGL實現DDA畫線算法

#include <GL/GLUT.H> #include <iostream> #include <math.h> using namespace std; float xs = 0.0; float ys = 0.0; float

原创 C#調用C/C++動態鏈接庫

目的:    C#調用C/C++動態鏈接庫的簡單案例:用C#實現窗口調用由C/C++編譯生成的dll,dll實現兩整數求和功能,即函數int Add(int x, int y);    實現步驟: 一:用C/C++編寫dll 1、新建V

原创 用OpenGL實現 中點畫圓法

#include "GL/glut.h" #include "math.h" #include <iostream> using namespace std; int xs = 0; int ys = 0; int r = 0; v

原创 用OpenGL實現 Breseham畫圓算法

#include <GL/glut.h> #include <math.h> #include <iostream> using namespace std; int xs = 0; int ys = 0; int r = 0; v

原创 用OPenGL實現 Bresenham畫線算法

#include<GL/GLUT.H> #include<stdio.h> #include<math.h> int xs,ys,xe,ye; void BresenhamLine(int x0,int y0,int x1,int y1)

原创 用兩個棧實現隊列

//用兩個棧實現隊列,實現在隊尾添加元素和在隊列頭部刪除元素 #include <iostream> using namespace std; const int DEPTH = 20; //定義棧的深度 template <cla

原创 C/C++之空數組

空數組指長度爲0的數組,僅可在類或者結構體中聲明。 使用形式如下: struct strTest { int a; char cc[0]; }; 定義空數組的好處有: 1. 不佔用空間,如果是指針的話還需要4字節空間,而空數組不佔用

原创 Source Insight 4.0配置格式化工具AStyle.exe

1. 下載AStyle.exe工具,官網地址:https://sourceforge.net/projects/astyle/files/      下載後解壓縮文件,進入AStyle_3.1_windows\AStyle\bin目錄下取

原创 IOT(互操作測試)

  IOT(Interoperability Test,互操作測試)是多廠商運營環境形成的技術基礎。只有完成Iu接口的IOT,才能保證不同廠家的無線接入網與核心網互聯互通,也只有完成Uu接口的IOT,才能保證每一款手機與無線接入系統之間