Sometimes, you just fuck up

I've spent the past two hours trying to debug this shitty program I wrote only to finally figure out the issue. For some stupid reason, I forgot to increment the one variable keeping track of the size of an array of strings. Am I an idiot Jow Forums? (faggot?) you decide

>Pic related, highlighted fucker is the kicker

Attached: Screenshot (2).png (1922x1091, 195K)

>Can't write a for loop without fucking up
user, I just can't even

Making a personal blog post about your homework is even more retarded OP.,

>Electron

Get the fuck out nigger

that's not Code you dumb fucking bitch.

Look closer, retard.

donovan pls

I can't stand IDEs, they just look so bloated.

If you're tripping over simple stuff, it's a good sign that you need to take a break. Come back when your stress levels are lower and mistakes won't kite you around like this.

Attached: 1420177771641.gif (500x334, 982K)

Use the std algorithms instead. In your case, that would mean something like
auto mod_index = std::count_if(mod_list.begin(), mod_list.end(), [](auto c) { return c == '@'; });

It's also better since it works as documentation of your intent.

Not using a decent IDE like VSCode or Atom

That's what you get for using C++ faggot.

Horrible code, what the fuck are you doing? Is this ironic?
std::vector is what you want. And use a range-based or at LEAST an iterator-based for loop.
Don't use naked new you WILL leak data at one point.

So much this, OP sit down and read a fucking BOOK

to expand on this , you can complement the std ones with your own custom algos. From your source, I guess you are trying to split a string into an array of strings by a special character.
Instead of programming like a monkey, you could solve the general problem instead:
template
InputIt copy_while(InputIt first, InputIt last, OutputIt d_first, UnaryPredicate pred)
{
while (first != last) {
if (pred(*first)) {
*d_first++ = *first++;
} else break;
}
return first;
}

template
std::vector split_by(const T &t, U u)
{
std::vector v;
auto next = t.begin();
while (next != t.end()) {
T e;
next = copy_while(next, t.end(), std::back_inserter(e),
[=](auto c){ return u != c; });
v.emplace_back(e);
}
return v;
}

Now you can split generic containers by a generic value type into a vector of the original container type.

that should be
else { first++; break; }

I did the same thing. Wrote a serialiser to save some workbook data, but every time it loaded it would lose two cells of data off the end.

Realised I was using the wrong index incrementer to grab the data, causing it to skip over the load data at the end. Felt like a real idiot for that one.

If he's trying to split strings like that, he should be using library

That's why you're unemployed

>Microsoft Visual Studio
>sepples
>using namespace std
yes you are

Wintoddlers are literally retarded.

>not

>for (char i::modList)
>if (i=='@') ++modIndex;

You're a retard

Take a break and then come back to it.