🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.programming
Article #216875

najprosze możliwe pytanie z C++

#216875
From: RM
Date: Tue, 14 Apr 2020 07:49
14 lines
1248 bytes
Uczę się C++. Mam taki kod:

#include <string>
...
std::string errors;
...
errors += "Invalid usage. Result directory must be different from 
application directory.\n";

Nie rozumiem dlaczego błąd:
żaden operator "+=" nie pasuje do tych argumentów operacji -- typy 
operandów: const std::__cxx11::string += const char [70]

Tym bardziej że w innym miejscu podobne przypisanie += się kompiluje.
Technical Details
Message-ID: <r73pv0$3er5h$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: najprosze możliwe pytanie z C++
Date: Tue, 14 Apr 2020 09:49:50 +0200
Organization: http://www.wit.edu.pl
Message-ID: <r73pv0$3er5h$1@portraits.wsisiz.edu.pl>
Mime-Version: 1.0
Injection-Date: Tue, 14 Apr 2020 07:49:52 -0000 (UTC)
Injection-Info: portraits.wsisiz.edu.pl; posting-host="user-5-173-144-148.play-internet.pl:5.173.144.148"; logging-data="3632305"; 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