⑴ 我的學習效率不高,現在已經大二下學期了,想提高c++編程能力。請給個好的學習方法吧!!
首先找一本講C++的書,通讀一遍,最好能把書上所有的例子自己敲一遍,編譯、運行。學編程肯定要動手寫代碼的,光看是不夠的,自己寫的時候才會發現各種問題,自己敲得多了,常用的頭文件、函數啊,就慢慢熟悉了;編譯過程中,可能會出現錯誤、警告,排除這些警告、錯誤也是對學習有幫助的。
語法掌握之後,要看你自己的規劃了,主要分兩種情況吧,一是Windows編程,一是Unix/Linux。看情況找相關的書學習一下,不過也可以選擇在Windows下用不同的IDE練習,或者先學Windows編程然後再轉向Linux,都是可以融匯貫通的,不同操作系統也有各自優點。
如果學了界面編程的東西,就可以嘗試著編寫小軟體,比如編寫一個區域網聊天、傳送文件的軟體、仿寫一個Windows畫圖,慢慢增加難度。
可以熟練的編寫代碼之後可以研究數據結構、演算法、設計模式等一些難一點的東西了,然後用這些東西改進、優化自己的設計,用到新的設計當中。
Ps~推薦一下VC知識庫,這上面有很多文章不錯,最重要的是有源代碼,對學習幫助很大;Linux編程的話,可以看一下早期Linux的源碼,作為一個優秀的操作系統,Linux的源碼有很多值得學習的地方。
⑵ Windows XP系統源碼 下載地址
《Windows XP系統》網路網盤免費資源下載
鏈接:
WindowsXP是微軟公司研發的計算機操作系統,於2001年10月25日正式發布。其名字中「XP」的意思來自英文中的「體驗(Experience)」。
⑶ java windows記事本源代碼
該項目代碼包括兩個文件:MainFrame.java和SelectTextFile.java。
(SelectTextFile.java的代碼這里就不貼了,太長了。你網路HI我吧^_^)
補充說明:我這個裡面沒有「新建」,但其實新建也是一樣調用那個SelectTextFile.java而已,而且,新建的時候更簡單,只須按照路徑調用File的.createNewFile()就可以了。具體我就不添加了。有疑問的話你可以網路HI我)
1.MainFrame.java代碼:
package MyProject;
import java.awt.BorderLayout;
import javax.swing.JPanel;
import javax.swing.JFrame;
import java.awt.Dimension;
import javax.swing.JMenuBar;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.JLabel;
import java.awt.Rectangle;
import javax.swing.JTextArea;
import javax.swing.JScrollPane;
import java.awt.datatransfer.*;
import java.io.*;
public class MainFrame extends JFrame {
private static final long serialVersionUID = 1L;
private JPanel jContentPane = null;
private JMenuBar jJMenuBar = null;
private JMenu jMenu = null;
private JMenu jMenu1 = null;
private JMenu jMenu2 = null;
private JMenuItem jMenuItem = null;
private JMenuItem jMenuItem1 = null;
private JMenuItem jMenuItem2 = null;
private JMenuItem jMenuItem3 = null;
private JLabel jLabel = null;
private JScrollPane jScrollPane = null;
private JTextArea jTextArea = null;
private JMenuItem jMenuItem4 = null;
private JMenuItem jMenuItem5 = null;
private JMenuItem jMenuItem6 = null;
private JMenuItem jMenuItem7 = null;
private static MainFrame myMainFrame=null;
private static String textstr="";///用於記錄文本文件的路徑
private File myFile=null;
private FileReader myrder=null;
private FileWriter mywr=null;
/**
* This is the default constructor
*/
public MainFrame() {
super();
initialize();
}
/**
* This method initializes this
*
* @return void
*/
private void initialize() {
this.setSize(412, 350);
this.setJMenuBar(getJJMenuBar());
this.setContentPane(getJContentPane());
this.setTitle("JFrame");
this.addWindowListener(new java.awt.event.WindowAdapter() {
public void windowActivated(java.awt.event.WindowEvent e) {
if(!textstr.equals("")){
try{
myFile=new File(textstr);
if(!myFile.exists()){
myFile.createNewFile();
}
myrder=new FileReader(myFile);
char[] mychar=new char[(int)myFile.length()];
myrder.read(mychar);
String tmp=new String(mychar);
jTextArea.setText(tmp);
myrder.close();
}
catch(Exception ee){
ee.printStackTrace();
}
}
}
public void windowClosing(java.awt.event.WindowEvent e) {
System.exit(0);
}
});
this.setVisible(true);
myMainFrame=this;
}
/**
* This method initializes jContentPane
*
* @return javax.swing.JPanel
*/
private JPanel getJContentPane() {
if (jContentPane == null) {
jLabel = new JLabel();
jLabel.setBounds(new Rectangle(15, 18, 65, 18));
jLabel.setText("文件內容:");
jContentPane = new JPanel();
jContentPane.setLayout(null);
jContentPane.add(jLabel, null);
jContentPane.add(getJScrollPane(), null);
}
return jContentPane;
}
/**
* This method initializes jJMenuBar
*
* @return javax.swing.JMenuBar
*/
private JMenuBar getJJMenuBar() {
if (jJMenuBar == null) {
jJMenuBar = new JMenuBar();
jJMenuBar.add(getJMenu());
jJMenuBar.add(getJMenu1());
jJMenuBar.add(getJMenu2());
}
return jJMenuBar;
}
/**
* This method initializes jMenu
*
* @return javax.swing.JMenu
*/
private JMenu getJMenu() {
if (jMenu == null) {
jMenu = new JMenu();
jMenu.setText("文件");
jMenu.add(getJMenuItem());
jMenu.add(getJMenuItem1());
jMenu.add(getJMenuItem2());
jMenu.add(getJMenuItem3());
}
return jMenu;
}
/**
* This method initializes jMenu1
*
* @return javax.swing.JMenu
*/
private JMenu getJMenu1() {
if (jMenu1 == null) {
jMenu1 = new JMenu();
jMenu1.setText("編輯");
jMenu1.add(getJMenuItem4());
jMenu1.add(getJMenuItem5());
jMenu1.add(getJMenuItem6());
}
return jMenu1;
}
/**
* This method initializes jMenu2
*
* @return javax.swing.JMenu
*/
private JMenu getJMenu2() {
if (jMenu2 == null) {
jMenu2 = new JMenu();
jMenu2.setText("幫助");
jMenu2.add(getJMenuItem7());
}
return jMenu2;
}
/**
* This method initializes jMenuItem
*
* @return javax.swing.JMenuItem
*/
private JMenuItem getJMenuItem() {
if (jMenuItem == null) {
jMenuItem = new JMenuItem();
jMenuItem.setText("打開");
jMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
MainFrame.this.myMainFrame.setEnabled(false);
SelectTextFile mysl=new SelectTextFile();
mysl.setVisible(true);
}
});
}
return jMenuItem;
}
/**
* This method initializes jMenuItem1
*
* @return javax.swing.JMenuItem
*/
private JMenuItem getJMenuItem1() {
if (jMenuItem1 == null) {
jMenuItem1 = new JMenuItem();
jMenuItem1.setText("關閉");
jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
try{
myFile=null;
}
catch(Exception ee){
ee.printStackTrace();
}
jTextArea.setText("");
}
});
}
return jMenuItem1;
}
/**
* This method initializes jMenuItem2
*
* @return javax.swing.JMenuItem
*/
private JMenuItem getJMenuItem2() {
if (jMenuItem2 == null) {
jMenuItem2 = new JMenuItem();
jMenuItem2.setText("保存");
jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
try{
String tmp=jTextArea.getText();
char[] mychar=tmp.toCharArray();
myFile.delete();
myFile.createNewFile();
mywr=new FileWriter(myFile);
mywr.write(mychar);
mywr.close();
}
catch(Exception ee){
ee.printStackTrace();
}
}
});
}
return jMenuItem2;
}
/**
* This method initializes jMenuItem3
*
* @return javax.swing.JMenuItem
*/
private JMenuItem getJMenuItem3() {
if (jMenuItem3 == null) {
jMenuItem3 = new JMenuItem();
jMenuItem3.setText("退出");
jMenuItem3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
System.exit(0);
}
});
}
return jMenuItem3;
}
/**
* This method initializes jScrollPane
*
* @return javax.swing.JScrollPane
*/
private JScrollPane getJScrollPane() {
if (jScrollPane == null) {
jScrollPane = new JScrollPane();
jScrollPane.setBounds(new Rectangle(15, 46, 371, 225));
jScrollPane.setViewportView(getJTextArea());
}
return jScrollPane;
}
/**
* This method initializes jTextArea
*
* @return javax.swing.JTextArea
*/
private JTextArea getJTextArea() {
if (jTextArea == null) {
jTextArea = new JTextArea();
}
return jTextArea;
}
/**
* This method initializes jMenuItem4
*
* @return javax.swing.JMenuItem
*/
private JMenuItem getJMenuItem4() {
if (jMenuItem4 == null) {
jMenuItem4 = new JMenuItem();
jMenuItem4.setText("復制");
jMenuItem4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
MainFrame.this.setClipboardText(MainFrame.this.getToolkit().getSystemClipboard(),jTextArea.getSelectedText());
}
});
}
return jMenuItem4;
}
/**
* This method initializes jMenuItem5
*
* @return javax.swing.JMenuItem
*/
private JMenuItem getJMenuItem5() {
if (jMenuItem5 == null) {
jMenuItem5 = new JMenuItem();
jMenuItem5.setText("剪切");
jMenuItem5.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
MainFrame.this.setClipboardText(MainFrame.this.getToolkit().getSystemClipboard(),jTextArea.getSelectedText());
jTextArea.setText(jTextArea.getText().substring(0,jTextArea.getSelectionStart()));
}
});
}
return jMenuItem5;
}
/**
* This method initializes jMenuItem6
*
* @return javax.swing.JMenuItem
*/
private JMenuItem getJMenuItem6() {
if (jMenuItem6 == null) {
jMenuItem6 = new JMenuItem();
jMenuItem6.setText("黏貼");
jMenuItem6.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
try{
jTextArea.setText(jTextArea.getText().substring(0,jTextArea.getSelectionStart()));
jTextArea.setText(jTextArea.getText()+(MainFrame.this.getClipboardText(MainFrame.this.getToolkit().getSystemClipboard())));
}
catch(Exception ee){
ee.printStackTrace();
}
}
});
}
return jMenuItem6;
}
/**
* This method initializes jMenuItem7
*
* @return javax.swing.JMenuItem
*/
private JMenuItem getJMenuItem7() {
if (jMenuItem7 == null) {
jMenuItem7 = new JMenuItem();
jMenuItem7.setText("關於記事本");
jMenuItem7.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
////暫無代碼!!
}
});
}
return jMenuItem7;
}
public static void main(String args[]){
new MainFrame();
}
public static MainFrame getMyMainFrame() {
return myMainFrame;
}
public static void setMyMainFrame(MainFrame myMainFrame) {
MainFrame.myMainFrame = myMainFrame;
}
public static String getTextstr() {
return textstr;
}
public static void setTextstr(String textstr) {
MainFrame.textstr = textstr;
}
protected static String getClipboardText(Clipboard clip) throws Exception{
Transferable clipT = clip.getContents(null);// 獲取剪切板中的內容
if (clipT != null) {
if (clipT.isDataFlavorSupported(DataFlavor.stringFlavor)) // 檢查內容是否是文本類型
return (String)clipT.getTransferData(DataFlavor.stringFlavor);
}
return null;
}
protected static void setClipboardText(Clipboard clip, String writeMe) {
Transferable tText = new StringSelection(writeMe);
clip.setContents(tText, null);
}
} // @jve:decl-index=0:visual-constraint="10,10"
⑷ MFC WINDOWS程序設計(第二版)》配套的源碼
http://download2.gbaopan.com/.gbp?supplierID=2786211
密碼: shubulo.com_mfcwinp
如果下不來,給我email
[email protected]
⑸ windows系統的源代碼,為什麼沒人反編譯出來
原因:
一是代碼經過編譯後,反編譯是比較困難的。
二是代碼量超級大;
三是能夠反編譯的力量沒這么強大;
四是不是任何程序都能夠完整「還原」。
微軟現在也已經對部分代碼實行了公開,有他的公開網站,不過在上面我至今沒查到過我所需要的東西。
⑹ 有誰有電腦windows自帶的那個掃雷程序的源代碼啊跪求啊。。謝謝。。
怎麼不給個郵箱。。。 我有
⑺ python windows系統 源代碼
一、python如何運行程序
首先說一下python解釋器,它是一種讓其他程序運行起來的程序。當你編寫了一段python程序,python解釋器將讀取程序,並按照其中的命令執行,得出結果,實際上,解釋器是代碼與機器的計算機硬體之間的軟體邏輯層。
通俗來說,我們的計算機是基於二進制進行運算的,無論你用什麼語言來寫程序,無論你的程序寫的多麼簡單或多麼復雜,最終交給計算機運行的一定是0或1,因為計算機只能識別0和1。
我們目前使用的大多數編程語言都是高級程序語言,也就是利於我們人類閱讀的語言,要使我們編寫的程序能夠在計算機上跑起來,要經過一定的轉換才可以,python程序大致的過程應該是這樣:
源代碼-->位元組碼-->pvm(虛擬機)-->機器碼
可以到Python的官方網站下載python(http://www.python.org),通常包括解釋器、庫文件及簡單的編碼環境(IDLE)。把源代碼編譯成位元組碼其實是為了程序更節省時間,如果源代碼沒有變動,那麼運行程序時會直接從位元組碼讀取,加快速度,把位元組碼放到虛擬機去解釋,可以更好的跨平台運行,最後轉換成機器碼。
二、Windows系統下搭建python編程環境。
1、進入Python官網http://www.python.org,在「Downloads」下拉菜單中選擇相應的操作系統,我們選擇windows。
最後選擇菜單中的Run下的run mole即可運行,快捷鍵為F5。