IDE やプロファイラまでついてくるフリー最強の C++ コンパイラ
Watcom C++ について語りませう。
一応、こちらから入手できます。
難点はちょっと大きい事(45MB)です。
http://www.openwatcom.org/
探検
OpenWatcom C++
■ このスレッドは過去ログ倉庫に格納されています
1デフォルトの名無しさん
NGNG768デフォルトの名無しさん
2014/03/22(土) 17:19:23.68ID:4HmosEXO769デフォルトの名無しさん
2014/04/03(木) 04:15:15.90ID:DqBt0M+X #include <iostream.h>
#include <string.h>
#include <string.hpp>
void display(String & s)
{
cout << "length = " << s.length() << endl;
int u = strcspn( s.c_str(), "0123456789"); // Error!
cout << "u = " << u << endl;
}
// つづく
#include <string.h>
#include <string.hpp>
void display(String & s)
{
cout << "length = " << s.length() << endl;
int u = strcspn( s.c_str(), "0123456789"); // Error!
cout << "u = " << u << endl;
}
// つづく
770デフォルトの名無しさん
2014/04/03(木) 04:16:13.95ID:DqBt0M+X int main(int argc, char *argv[])
{
const int COUNT = 4096;
String id("bcd10023");
int id_length = id.length();
switch(argc) {
case 2:
if(! strcmp(argv[1], "-e") ) { // Errorになるオプション
String s = id(id_length, COUNT);
display(s);
} else {
display(id);
}
break;
default:
display(id);
break;
}
return 0;
}
{
const int COUNT = 4096;
String id("bcd10023");
int id_length = id.length();
switch(argc) {
case 2:
if(! strcmp(argv[1], "-e") ) { // Errorになるオプション
String s = id(id_length, COUNT);
display(s);
} else {
display(id);
}
break;
default:
display(id);
break;
}
return 0;
}
771デフォルトの名無しさん
2014/04/03(木) 04:18:00.77ID:DqBt0M+X C:\work>cspan
length = 8
u = 3
C:\work>cspan -e
length = 0
The instruction at 0x00401412 referenced memory at 0x00000000.
The memory could not be read.
C:\work>cspan -s
length = 8
u = 3
length = 8
u = 3
C:\work>cspan -e
length = 0
The instruction at 0x00401412 referenced memory at 0x00000000.
The memory could not be read.
C:\work>cspan -s
length = 8
u = 3
772デフォルトの名無しさん
2014/04/03(木) 05:02:24.33ID:8q69jo+f > String s = id(id_length, COUNT);
なにこれ
C:\WATCOM\docs\cpplib.pdf
にも書いてないけど
なにこれ
C:\WATCOM\docs\cpplib.pdf
にも書いてないけど
773デフォルトの名無しさん
2014/04/03(木) 05:27:06.37ID:DqBt0M+X 部分文字列です
sub-sequenceは、posからはじまって、len個つづきます
The sub-sequence begins at offset pos within the String object and continues for len characters.
String::operator ()()
Synopsis: #include <string.hpp>
public:
String String::operator ()( size_t pos, size_t len ) const;
Semantics: This form of the operator () public member function extracts a sub-sequence of characters from
the String object. A new String object is created that contains the sub-sequence of characters.
The sub-sequence begins at offset pos within the String object and continues for len characters. The
first character of a String object is at position zero.
If pos is greater than or equal to the length of the String object, the result is empty.
If len is such that pos + len exceeds the length of the object, the result is the sub-sequence of characters
from the String object starting at offset pos and running to the end of the String object.
Results: The operator () public member function returns a String object.
See Also: String::operator [], operator char, operator char const *
String Class 873
cpplib.pdf
sub-sequenceは、posからはじまって、len個つづきます
The sub-sequence begins at offset pos within the String object and continues for len characters.
String::operator ()()
Synopsis: #include <string.hpp>
public:
String String::operator ()( size_t pos, size_t len ) const;
Semantics: This form of the operator () public member function extracts a sub-sequence of characters from
the String object. A new String object is created that contains the sub-sequence of characters.
The sub-sequence begins at offset pos within the String object and continues for len characters. The
first character of a String object is at position zero.
If pos is greater than or equal to the length of the String object, the result is empty.
If len is such that pos + len exceeds the length of the object, the result is the sub-sequence of characters
from the String object starting at offset pos and running to the end of the String object.
Results: The operator () public member function returns a String object.
See Also: String::operator [], operator char, operator char const *
String Class 873
cpplib.pdf
774デフォルトの名無しさん
2014/04/03(木) 05:31:01.56ID:DqBt0M+X // substri.cpp
#include <iostream.h>
#include <string.hpp>
int main(int argc, char *argv[])
{
const int COUNT = 4096;
String id("bcd10023");
int id_length = id.length();
String s = id(id_length, COUNT);
cout << "s: length = " << s.length() << endl;
cout << s << endl;
int count = 3;
int begin = 3;
String g = id(begin, count);
cout << "g: length = " << g.length() << endl;
cout << g << endl;
return 0;
}
/*
C:\work>substri
s: length = 0
g: length = 3
100
*/
#include <iostream.h>
#include <string.hpp>
int main(int argc, char *argv[])
{
const int COUNT = 4096;
String id("bcd10023");
int id_length = id.length();
String s = id(id_length, COUNT);
cout << "s: length = " << s.length() << endl;
cout << s << endl;
int count = 3;
int begin = 3;
String g = id(begin, count);
cout << "g: length = " << g.length() << endl;
cout << g << endl;
return 0;
}
/*
C:\work>substri
s: length = 0
g: length = 3
100
*/
775デフォルトの名無しさん
2014/05/25(日) 16:37:45.33ID:Rj36S/n2 追加されそうにないし暇つぶしに書いた
大体動く
namespace std{
inline istream& operator>>(istream is, string& str)
{
if(!is.good())return is;
str.erase();
string::size_type sz = is.width();
if(sz==0)sz=str.max_size();
std::cout << is.width() << std::endl;
char c;
is.get(c);
for(string::size_type i=0; !isspace(c) && !is.eof() && (i < sz);i++){
str += c;
is.get(c);
}
is.width(0);
return is;
};
inline ostream& operator<<(ostream os,const string str)
{
if(!os.good())return os;
os.write(str.data(),str.size());
return os;
};
}
大体動く
namespace std{
inline istream& operator>>(istream is, string& str)
{
if(!is.good())return is;
str.erase();
string::size_type sz = is.width();
if(sz==0)sz=str.max_size();
std::cout << is.width() << std::endl;
char c;
is.get(c);
for(string::size_type i=0; !isspace(c) && !is.eof() && (i < sz);i++){
str += c;
is.get(c);
}
is.width(0);
return is;
};
inline ostream& operator<<(ostream os,const string str)
{
if(!os.good())return os;
os.write(str.data(),str.size());
return os;
};
}
776デフォルトの名無しさん
2014/06/09(月) 23:57:18.89ID:dAVEHAsk windows 7,64bitを使っているのですが,
wclでコンパイルした実行ファイルは,64bitでは使えない
というメッセージがでるのですが,wcl386でコンパイルする
と実行できるのです。
wclとwcl386とではどう違うのでしょうか。
wclでコンパイルした実行ファイルは,64bitでは使えない
というメッセージがでるのですが,wcl386でコンパイルする
と実行できるのです。
wclとwcl386とではどう違うのでしょうか。
777デフォルトの名無しさん
2014/06/10(火) 01:06:02.23ID:kNmgHm7N wcl は 16bit CPU 環境用の exe を生成。
wcl386 は 32bit CPU 環境用の exe 生成。
32bit windows は 16/32 bit(cpu) exe を実行できるけど、
64bit windows は 32/64bit exe のみで 16bit exeを実行できない。
wcl386 は 32bit CPU 環境用の exe 生成。
32bit windows は 16/32 bit(cpu) exe を実行できるけど、
64bit windows は 32/64bit exe のみで 16bit exeを実行できない。
778デフォルトの名無しさん
2014/06/10(火) 05:40:57.55ID:ZIPkO3Cr >777
了解しました。
ありがとうございます。
了解しました。
ありがとうございます。
779デフォルトの名無しさん
2014/08/03(日) 12:09:22.65ID:91Gs3y/1 ★2ch勢いランキングサイトリスト★
◎ +ニュース
・ 2NN
・ 2chTimes
◎ +ニュース新着
・ 2NN新着
・ Headline BBY
◎ +ニュース他
・ Desktop2ch
・ 記者別一覧
◎ 全板
・ 全板縦断勢いランキング
・ スレッドランキング総合ランキング
◎ 実況込み
・ 2勢
・ READ2CH
・ i-ikioi
※ 要サイト名検索
◎ +ニュース
・ 2NN
・ 2chTimes
◎ +ニュース新着
・ 2NN新着
・ Headline BBY
◎ +ニュース他
・ Desktop2ch
・ 記者別一覧
◎ 全板
・ 全板縦断勢いランキング
・ スレッドランキング総合ランキング
◎ 実況込み
・ 2勢
・ READ2CH
・ i-ikioi
※ 要サイト名検索
■ このスレッドは過去ログ倉庫に格納されています
ニュース
- 「レーダー照射」なぜ中国は素直に謝罪しないのか 非を認めず反論、逆ギレ「ごめんなさい」と言えない国情★3 [七波羅探題★]
- 【サッカー】Jリーグ、43億円の赤字予算を承認 ★2 [鉄チーズ烏★]
- 松村沙友理、スタバは好きだけど「やっぱコーヒーに700円800円が…」「家でお湯わかしてやったらタダやん」 [muffin★]
- 40代教員、1億8600万円分の暗号資産だまし取られる 「警察手帳のような物」見せられ−滋賀県草津市 [蚤の市★]
- 上野動物園の双子パンダ、1月末に中国に返還へ 国内でパンダ不在に ★4 [蚤の市★]
- 【ラブホ】小川晶前市長、出直し立候補意向 周囲に伝達 群馬・前橋市長選 [ぐれ★]
- 【動画】クラスの女子達からリンチされるいじめられっ子男子、めちゃくちゃ可哀想🥹 [632966346]
- 4:44:44.444
- ブレイキングダウンの試合前挑発タイムでくも膜下出血 朝倉未来の責任は [279254606]
- 最近ネットでよく見る「チュウ日人が減って改めて感じた。害悪なのは
- 🟡←この丸が何を意味してるかわかるか?これはな...
- 最近ずっと雨音が流れてるyoutube配信聴きながら寝てる
