原创 C#之判斷字母大小、字母轉ACII碼

using System; using System.Text; namespace ValueType { class Program { static void Main() {

原创 C#之泛型使用 IEnumerable

using System; using System.Collections; using System.Collections.Generic; using System.Text; using System.Linq; namespa

原创 C# 變量與子級變量

using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace test { class Progra

原创 C#順序表操作

內容轉移至順序表操作

原创 C++ 獲取文件大小(字節)

#include<iostream> #include<fstream> using namespace std; void main() { FILE *pFile; char *file; file="E:/圖片/Saved P

原创 C++ socket中recv和send機制

利用TCP傳遞信息時要注意:TCP傳輸是流的方式:即send 100個字節後對方如果沒有及時recv取出, 這時又send 100個字節,則recv有可能接收到兩次發送疊加的部分或全部數據,所有在傳送結構體數據 時,應當發送以後睡眠一段時

原创 C++ 將一個文件讀入數組再讀出數組

<pre name="code" class="cpp">#include<iostream> #include<fstream> using namespace std; #define MAX_PACK_SIZE 1024

原创 C++獲取路徑中的文件名

<pre name="code" class="cpp">#include<iostream> #include<fstream> using namespace std; void main() { char *file;

原创 C++中關於函數內靜態數組和new分配的動態數組的區別分析

#include<iostream> using namespace std; char *GetFilePath(); void main() { cout<<GetFilePath()<<endl; } char *GetFil

原创 strcpy strcpy_s

我們有個數組: unsigned char buf[2]; 當我們使用strcpy(buf, "1234567")時, 以buf爲起點的*(buf+3)也就是buf[3]被寫入值, 但是, 此時也許這個buf+3這個位置被其它的程序或變

原创 C++ strlen()+1問題

#include<iostream> using namespace std; void main() { char a[20]; strcpy(a,"wewsdwe"); //strlen(a)返回爲7,而實際

原创 C++利用socket的客戶端和服務器之間傳輸文件

//服務器的代碼文件有 /* message.h source.h source.cpp server.h server.cpp */ //客戶端的代碼文件有 /* message.h 和服務器端一樣 client.h client.

原创 C++ 子類轉父類 父類確定子類

//父類有多個子類,子類強制轉換爲父類,根據子類在父類中的共有信息確定 //被強制轉換的是哪個子類 #pragma once #include<iostream> #include<fstream> using namespace std

原创 C# Socket簡單例子(服務器與客戶端通信)

服務器端代碼: using System.Net.Sockets; using System.Net; using System.Threading; using System; using System.Text; namesp

原创 c#接口作用的深入理解

1、C#接口的作用 :C#接口是一個讓很多初學C#者容易迷糊的東西,用起來好像很簡單,定義接口,裏面包含方法,但沒有方法具體實現的代碼,然後在繼承該接口的類裏面要實現接口的所有方法的代碼,但沒有真正認識到接口的作用的時候就覺得用接口是多此