Code::Blocks Forums
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
As usual while waiting for the next release - don't forget to check the
nightly builds
in the forum.
Home
Help
Search
Login
Register
Code::Blocks Forums
»
User forums
»
Help
»
Unidentified wanrning
« previous
next »
Send this topic
Print
Pages: [
1
]
Go Down
Author
Topic: Unidentified wanrning (Read 3629 times)
Sasha
Multiple posting newcomer
Posts: 21
Unidentified wanrning
«
on:
December 16, 2020, 05:17:30 pm »
Why CB Old Version compiles the following code Successfully with warning on line #8
#include <iostream>
#include <vector>
using namespace std;
int main()
{
vector <string> strings(7);
strings[4] = "Busted...";
cout << strings[4] << endl;
return 0;
}
Logged
sodev
Regular
Posts: 497
Re: Unidentified wanrning
«
Reply #1 on:
December 16, 2020, 06:36:46 pm »
That screenshot is from Eclipse
Posting the warning message might also help...
Logged
oBFusCATed
Developer
Lives here!
Posts: 13413
Re: Unidentified wanrning
«
Reply #2 on:
December 16, 2020, 07:39:34 pm »
Because:
1. You're using different compiler.
2. You're using different set of command line arguments.
Logged
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]
omlk
Multiple posting newcomer
Posts: 110
Re: Unidentified wanrning
«
Reply #3 on:
December 16, 2020, 08:21:05 pm »
C
https://www.tulane.edu/~mpuljic/cpp/savitch/chapter11
C++
https://www.softwaretestinghelp.com/cpp-string-array
«
Last Edit: December 16, 2020, 08:24:50 pm by omlk
»
Logged
Sasha
Multiple posting newcomer
Posts: 21
Re: Unidentified wanrning
«
Reply #4 on:
December 19, 2020, 05:26:47 pm »
Thank you for correcting me, the warning occurred in Eclipse and in CB also, I have updated to the next old version on windows XP, and everything works fine.
Logged
Send this topic
Print
Pages: [
1
]
Go Up
« previous
next »
Code::Blocks Forums
»
User forums
»
Help
»
Unidentified wanrning