🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.programming
Article #216898

problem z if przy debugowaniu w VSCode

#216898
From: RM
Date: Wed, 15 Apr 2020 17:53
14 lines
1237 bytes
Mam problemik przy debugowaniu w VSCode pod Linuxem.
Mam taki kod w C++:

if (m + 1 < matches2.size() - 1) {
   next_start = strstr(next.c_str(), matches2.str(m + 1).c_str()) - 
next.c_str();
} else {
   next_start = next.length();
}

i mimo że m = 1 oraz matches2.size() == 5 to debuger wchodzi mi do 
gałęzi else. (Zmienna m jest typu unsigned int a zmienna matches2 typu 
smatch.)
Jak to możliwe?
Technical Details
Message-ID: <r77hn3$5uj3$1@portraits.wsisiz.edu.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!wsisiz.edu.pl!.POSTED.user-5-173-144-148.play-internet.pl!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!wsisiz.edu.pl!.POSTED.user-5-173-144-148.play-internet.pl!not-for-mail
From: RM <robert_magdziarz@wp.pl>
Newsgroups: pl.comp.programming
Subject: problem z if przy debugowaniu w VSCode
Date: Wed, 15 Apr 2020 19:53:36 +0200
Organization: http://www.wit.edu.pl
Message-ID: <r77hn3$5uj3$1@portraits.wsisiz.edu.pl>
Mime-Version: 1.0
Injection-Date: Wed, 15 Apr 2020 17:53:39 -0000 (UTC)
Injection-Info: portraits.wsisiz.edu.pl; posting-host="user-5-173-144-148.play-internet.pl:5.173.144.148"; logging-data="195171"; mail-complaints-to="abuse@wsisiz.edu.pl"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.1
X-Mozilla-News-Host: news://news.icp.pl:119
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit