推介:| Web Hosting | 外賣系統 | Server colocation | Web Shop System | Makeup course |

查看完整版本: 有關C++中的goto的應用

花之慶次 2007-2-22 01:02

有關C++中的goto的應用

在撰寫C++程式中, 為什麼很少使用到goto這個語句呢??

jayzhou_2046 2007-2-22 09:01

[quote]原帖由 [i]花之慶次[/i] 於 2007-2-22 01:02 發表
在撰寫C++程式中, 為什麼很少使用到goto這個語句呢?? [/quote]
那是因為怕久而久之,
積了一堆goto後,
會令程式有bug(s).

滴滴歪 2007-2-25 11:27

现在讲究结构化设计 一般不建议用goto来跳

template 2007-3-2 20:37

GOTO is a concept of JUMP transit from assembly language (ASM). In C/C++, there is enough method to replace GOTO, such as IF-ELSE, SWITCH, WHILE... .

jinnib44873 2007-3-9 23:48

回復 #1 花之慶次 的帖子

謝謝  給了我很大的幫忙喔  版主  推推

tkor 2007-4-3 22:50

goto is not recommended in C++ due to its poor performance, but you can still use it for error handlings.

smaller 2007-4-5 00:04

i use a software 'press',it need use many goto,i write once then not want edit again

xq569 2007-4-17 12:43

GOTO is a concept of JUMP transit from assembly language (ASM). In C/C++, there is enough method to replace GOTO, such as IF-ELSE, SWITCH, WHILE... .

丫南 2007-4-19 18:36

GOOD!!感謝大大無私奉獻!!

sebestianD 2007-4-25 18:56

Try not to use GOTO .  It is a bad coding style in C++ and make the code much difficult to read and fix in the future.

hong1102 2007-4-26 21:58

goto虽然很方便,但对于大的程序来说,程序可读性差

melvillo 2007-4-27 14:31

久而久之,
積了一堆goto後,
會令程式有bug(s).

songthin 2007-5-5 02:22

GOTO会使程序结构过于混乱
頁: [1]
查看完整版本: 有關C++中的goto的應用