Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » vectors(doesn't like range based for loops)
vectors [message #1859595] Sun, 18 June 2023 23:06
sydney faria is currently offline sydney fariaFriend
Messages: 54
Registered: March 2013
Member
My project uses vectors and there are a lot of problems with the example code that I installed into a project. So I searched around and found this example on using vectors and made it into a project. The code I am using is attached. Lines //1 //3 //4 were the original lines of code. //6 was not in yet. The compiler complained about not being able to use an initializer list. So I took out line 1 and tried line 2. No complaint but now I have no list. But I still need to put in an array of values. So I took out lines 1 thru 4 and put in the lines 6 code. It looks like that is working, but now the compiler is complaining that range based for loops are not allowed - line 5. I do see these all over the place in example code!!! I sure would like to figure out how to use these vectors so I can go back to the original example with vector problems.
syd / wt1v
  • Attachment: main.cpp
    (Size: 0.64KB, Downloaded 150 times)
Previous Topic:pragma vs dynamic cast
Next Topic:github
Goto Forum:
  


Current Time: Mon Jan 20 00:30:13 GMT 2025

Powered by FUDForum. Page generated in 0.02190 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top