
unix/linux c/c++
yangyongde2002
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
unix c++ 生成的文件名不同导致结果不同
昨天开始学unix c++编程。自己输了个最简单的"hello world"程序,结果运行却不显示结果。 搞了半天,终于发现是输出文件的文件名的问题。 我的源文件"test.cxx",内容如下:#include using namespace std;int main(){ cout printf("abc/原创 2009-08-20 18:32:00 · 426 阅读 · 0 评论 -
开始学习CVS
CVS (Concurrent Versions System) is aversion control system.CVS can help people who work on the same project at the same time, and it can save every version of your software you have ever created w原创 2009-09-11 20:57:00 · 329 阅读 · 0 评论 -
escape sequence
newline /nvertical tab /vbackspace /bcarriage return /rformfeed /falert (bell) /abackslash //question mark /?single quota /doulbe quota /"原创 2009-09-29 17:23:00 · 388 阅读 · 0 评论 -
reference
A const reference is a reference that may refer to a const object. const reference is reference to const. nonconst reference is reference to a nonconst type. A nonconst reference may原创 2009-09-29 17:53:00 · 408 阅读 · 0 评论 -
enumerations
An enumeration is defined using the enum keyword, followed by an optional enumeration name, and a comma-separated list of enumerators enclosed in braces. By default, the first element is assigned th原创 2009-09-29 19:24:00 · 353 阅读 · 0 评论 -
第一次使用g++
比较幸运,尝试了几次就OK了。 g++ -c file_1.cppg++ -c file_2.cppg++ -c file_3.cpp g++ -o file_4.out file_1.o file_2.o file_3.o file_4.cpp 参考文献:http://homepages.gac.edu/~mc38/2001J/documentation/g原创 2009-10-02 18:03:00 · 726 阅读 · 0 评论 -
cin reads the standard input
string s;cin >> s; The string input operator: 1. Reads and discards any leading whitespace (e.g., spaces, newlines, tabs) 2. It then reads characters until the next whitespace character is原创 2009-11-18 00:49:00 · 391 阅读 · 0 评论 -
string Operations
s.empty() s.size()s[n]s1 + s2s1 = s2s1 == s2!=, , >=原创 2009-11-18 01:13:00 · 553 阅读 · 0 评论 -
vector subscript out of range
当初写日志,只是为了记录一下自己所做的事情,没想到会有别人来看。所以没有任何的解释,只是胡乱写了些东西。其实问题很简单,题目已经说明一切,错误就是越界,仔细检查代码,找出什么地方可能会越界就行了昨天运行程序时,突然出现了如题所述的错误。错误很明显,vector的下标越界了,但是之前一直没有什么问题啊,于是我仔细读代码,debug,然后拿出前天能运行的程序,依然会出现这个错误原创 2009-11-24 14:25:00 · 21347 阅读 · 8 评论