作者ric2k1 (Ric)
看板EE_DSnP
标题Re: [问题] 不能将函式 static bool ModNum::setVa …
时间Sun Apr 12 00:13:13 2009
: : 2.
: : 请问一下我要写 testMC 档只要切换到在 test 资料夹底下打 make test 就好了吗?
: yes, or "make ./test"
: : 还是要撰写 makefile...?
test.cpp 写在 src/test 底下 (已写好, 不用动),
但是 make 请在 root directory 底下.
: : 3.
: : 要怎麽引用 myString.cpp 里面的函数呀?
: : 以前只听过有人include .h 档案
: : 没有写过 include .cpp 档
: : 我看见了 util.h 档里面有加上 extern ...(myString 里面的函数)
: : 听说这样的写法表示告诉电脑某函数写在别的档案里
: : 但是如果除此之外并没有人讲说那些函数在哪个档案里
: : 还能够找的到吗?
: You only need to include .h files.
: Those linking problems are done by Makefile, so the computer knows the
: implementation of classes.
对於 cmd package 底下的 .cpp 档来说, 因为它们都有 include "util.h", 所以你就
直接用就好了. 其他 .cpp 如果有要使用这些 functions, 如果没有 include 就
include 一下吧!
: : 4.
: : 这次的作业档案散落各地分布在很多个资料夹里
: : 实际上要怎麽把他们合体变成一个执行档呢?
: Our considerate professor ric has written the Makefile for us, so just
: "make" and the executable will be generated.
: Hope my answers are right, if there's any error, please point out. Thx
Yes, just type "make" and the executable (modCalc) will be made. Of course,
you need to take care of the "TODO's" first.
Type "make test" will create the "testMC" executable.
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 61.224.46.66