※ 引述《su27 (su27)》之銘言:
: VC.net請問一下我要怎麼去加入另一個.CPP
managed code ? 看起來不太像。
我想先了解一下你有沒有用CLR的玩意?!
: 我之前都用VB.net C有學過 目前想複習一下語法 想去學習FIRMWARE
: 因為手上的書並不適用在VC.net
: 所以編譯不過 所以想請問一下 要怎麼改
: 我現在有主程式 A.cpp 跟 副程式 B.cpp
你用一堆只需要C就可以編出來的東西,就改回去C吧,何必一定要CPP呢?!
: A.cpp
: #include <stdio.h>
: #inclued <stdlib.h>
: #include "stdafx.h"
#include "b.h"
extern int x1;
: int _tmain(int argc, _TCHAR* argv[])
: {
: x1=4;
: printf("%d",x1);
: msg();
: system("pause");
: return 0;
: }
: 請問我B.cpp 要怎麼寫 上面的的X1(int x1;)是在B.cpp裡 msg也是
#include <cstdlib>
#include <cstdio>
int x1;
: void msg(void)
: {
: printf("Hello World");
: }
: 我不知道B.cpp要怎麼寫 還有 可以的話可以教我一下 B.h檔要怎麼寫嗎 謝謝
void msg(void);
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 112.105.195.3