OpenWatcom C++at TECH
OpenWatcom C++ - 暇つぶし2ch758:デフォルトの名無しさん
13/11/29 10:53:13.80 .net
2.0まだ~?

759:デフォルトの名無しさん
13/12/16 11:34:12.96 .net
URLリンク(sourceforge.net)

760:デフォルトの名無しさん
13/12/17 23:31:20.81 .net
ファイル名 2.0 だけど正式releaseじゃなくてデイリービルドなのか?
少し試してみたけど1.9 とほとんど変わってなさそうだった。
ヘッダみるとインデントや名前の付け替えは多いけど肝心の修正は少なそうだし

761:デフォルトの名無しさん
14/01/25 12:55:02.01 .net
stubがへんな日本語になのだが、英語にする方法教えて
環境は Windows XPで、wcl Version 1.8

>これは an OS/2 16-bit 実行可能 です

762:デフォルトの名無しさん
14/01/28 21:09:37.48 .net
SET WLANG=english

763:デフォルトの名無しさん
14/01/29 13:52:17.88 .net
見栄えがよくなったよ
ありがとん

>This is an OS/2 16-bit executable

764:デフォルトの名無しさん
14/02/12 23:45:17.25 .net
誰か新ネタくれよ

765: 【だん吉】
14/03/01 00:41:09.57 .net
これとVS2010のC++とどっちがいいかな

766:デフォルトの名無しさん
14/03/09 09:54:14.45 .net
std::forward_listきたか

767:デフォルトの名無しさん
14/03/21 15:40:46.17 HlK5TI/j.net
プロファイラのつかいかた
例でおしえてください
おねがいします
コマンドツールでもプロファイラつかえますか?
わからんわからん

768:デフォルトの名無しさん
14/03/22 17:19:23.68 4HmosEXO.net
>>767
ヘルプ見て分からないか?
デバッグ情報付きでビルドして、サンプラにかけて出たファイルをプロファイラに渡すだけだろ
最適化はかけとけよ

769:デフォルトの名無しさん
14/04/03 04:15:15.90 DqBt0M+X.net
#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;
}
// つづく

770:デフォルトの名無しさん
14/04/03 04:16:13.95 DqBt0M+X.net
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;
}

771:デフォルトの名無しさん
14/04/03 04:18:00.77 DqBt0M+X.net
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

772:デフォルトの名無しさん
14/04/03 05:02:24.33 8q69jo+f.net
> String s = id(id_length, COUNT);
なにこれ

C:\WATCOM\docs\cpplib.pdf

にも書いてないけど

773:デフォルトの名無しさん
14/04/03 05:27:06.37 DqBt0M+X.net
部分文字列です
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:デフォルトの名無しさん
14/04/03 05:31:01.56 DqBt0M+X.net
// 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

*/

775:デフォルトの名無しさん
14/06/09 23:57:18.89 dAVEHAsk.net
windows 7,64bitを使っているのですが,
wclでコンパイルした実行ファイルは,64bitでは使えない
というメッセージがでるのですが,wcl386でコンパイルする
と実行できるのです。
wclとwcl386とではどう違うのでしょうか。

776:デフォルトの名無しさん
14/06/10 01:06:02.23 kNmgHm7N.net
wcl は 16bit CPU 環境用の exe を生成。
wcl386 は 32bit CPU 環境用の exe 生成。

32bit windows は 16/32 bit(cpu) exe を実行できるけど、
64bit windows は 32/64bit exe のみで 16bit exeを実行できない。

777:デフォルトの名無しさん
14/06/10 05:40:57.55 ZIPkO3Cr.net
>777
了解しました。
ありがとうございます。

778:デフォルトの名無しさん
14/08/03 12:09:22.65 91Gs3y/1.net
★2ch勢いランキングサイトリスト★

◎ +ニュース
・ 2NN
・ 2chTimes
◎ +ニュース新着
・ 2NN新着
・ Headline BBY
◎ +ニュース他
・ Desktop2ch
・ 記者別一覧
◎ 全板
・ 全板縦断勢いランキング
・ スレッドランキング総合ランキング
◎ 実況込み
・ 2勢
・ READ2CH
・ i-ikioi

※ 要サイト名検索


最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch