+ -
当前位置:首页 → 问答吧 → 请教学C语言的环境, 步骤, 要点, 目的

请教学C语言的环境, 步骤, 要点, 目的

时间:2013-10-03

来源:互联网

引用:原帖由 Susan﹏汪汪 於 2013-9-12 11:25 发表

都可以咁讲
不过如果要有清楚的概念
c中是没有string这东西
有的只是char array
所以所有string功能在c是不存在 (((有的只是用在char array上的伪string function

这个我绝对不同意, 什么叫伪 string function, 或者什么叫伪 string?string 的 概念是什么???系未有C++/ java 时全世界都用 null terminated string这才是最原始的 string 概念唔通因为而家有 class string之后, null terminated string 就唔在系 string ?到今时今所有C 书本都仲系会有讲 string 系乜

作者: mm0747   发布时间: 2013-10-03

引用:原帖由 code4food 於 2013-9-12 11:46 发表

宜家一般OS都有memory protection,好难“一不小心, 很易crash个OS, system”。
如果佢想学写 driver 真系有d 机 , 个dirver 如果有一句 dereference null pointer, load 入 kernal 后, 唔知会唔会出篮画面呢

作者: mm0747   发布时间: 2013-10-04

引用:原帖由 Richards 於 2013-9-12 12:58 发表


谢谢师兄的讲解, 很详细!!
而我是用eclipse写java的
用开 eclipse 紧系用番 eclipse 唔驶念, 你好得闲想学新野令计

作者: mm0747   发布时间: 2013-10-04

引用:原帖由 mm0747 於 2013-9-11 09:07 PM 发表

如果佢想学写 driver 真系有d 机 , 个dirver 如果有一句 dereference null pointer, load 入 kernal 后, 唔知会唔会出篮画面呢
未学行先学走。

作者: code4food   发布时间: 2013-10-04

引用:原帖由 mm0747 於 2013-9-12 01:04 PM 发表

系未有C++/ java 时全世界都用 null terminated string这才是最原始的 string 概念唔通因为而家有 class string之后, ...


都唔系全世界,好似 Pascal 就唔用 null-terminated string,而用 length-prefixed string 嘞 只要 memory 唔系太少,其实后者好过前者好多

作者: fitcat07   发布时间: 2013-10-04

引用:原帖由 fitcat07 於 2013-9-12 14:49 发表

都唔系全世界,好似 Pascal 就唔用 null-terminated string,而用 length-prefixed string 嘞 只要 memory 唔系太少,其实后者好过前者好多
Yes, you are right, i didnt think carefully when i typed the reply , P String is a type a string too , thats why i dont understand whats mean fake string

[ 本帖最后由 mm0747 於 2013-9-12 03:24 PM 编辑 ]

作者: mm0747   发布时间: 2013-10-04

Fake string is sth similar to fake account.
引用:原帖由 mm0747 於 2013-9-12 15:23 发表

Yes, you are right, i didnt think carefully when i typed the reply , P String is a type a string too , thats why i dont understand whats mean fake string

作者: a8d7e8   发布时间: 2013-10-04

引用:原帖由 mm0747 於 2013-9-12 01:04 PM 发表

这个我绝对不同意, 什么叫伪 string function, 或者什么叫伪 string?string 的 概念是什么???系未有C++/ java 时全世界都用 null terminated string这才是最原始的 string 概念唔通因为而家有 class string之后, ...
系...
在基层而言string的确是char array

不过对於初学者来说.....如果只是单单讲话C系有string是一种误导
在其他的高阶语言
例如做string connect可以就咁单单a = b + c的做法
但C而言....需要的是对char array做checking然后再memory copy
基本上.....在C话系做string...不如话系char array...

作者: Susan﹏汪汪   发布时间: 2013-10-04

引用:原帖由 Susan﹏汪汪 於 2013-9-12 19:10 发表
系...
在基层而言string的确是char array

不过对於初学者来说.....如果只是单单讲话C系有string是一种误导
在其他的高阶语言
例如做string connect可以就咁单单a = b + c的做法
但C而言....需要的是对char ar ...
ok you win, 我放弃
我真系唔明究竟我用 C string 呢个字可以有几误导
讲 C 有 string 又可以有几误导

作者: mm0747   发布时间: 2013-10-04

Some diamond is flawless(F1) but having too much color(maybe N to Z?) which degrades its value drastistically.


There're always pre-conditions, assumptions and the like, that is called context.

I can also claim that there is "string" in assembly language or even in machine language, but what's the point?

The point lies in the same level of comparison, and realization of the ignorance of a newbie.


After all, for me, both arguments are rational, reasonable and understandable. So I'm not going to say that who is right or wrong, just showing my heart to the flawless and colorless diamond.
引用:原帖由 mm0747 於 2013-9-12 20:28 发表

ok you win, 我放弃
我真系唔明究竟我用 C string 呢个字可以有几误导
讲 C 有 string 又可以有几误导

作者: a8d7e8   发布时间: 2013-10-04

热门下载

更多