Int main()

int main()
{
cin >> words;
output = "";
int size = words.size();
for (i = 0; i < size; ++i); {
while (i < size); {
output += (":regional_indicator_" + words.at[i] +':');
}
}

cout

never mind the cout at the end, I already fixed that to output.

the error is on the line output += ... and pertains to words.at[i] I presume

Wow, that's embarrassing

>isn't a string inherently an array of characters

Yes, but C++ (correctly) tries to hide this from you. Something like words.c_str()[i] might work.

It runs with that but it doesn't print anything

Yes but a function is not an array of characters.

and debugging didn't give me any valuable insight

Probably because you're exiting your for and while loops immediately by putting a semicolon before the loop body

Explain to us exactly what your code is doing here (hint: your error is there):
for (i = 0; i < size; ++i); {
while (i < size); {
output += (":regional_indicator_" + words.at[i] +':');
}
}

words.at
is a function. You're trying to index a fucking function.
words[i]
//or alternatively
words.at(i)

Your fucking loops end with a semicolon;
for (i = 0; i < size; ++i)/*----->*/; // */; //

Only two anons have stated the blatant problem of this code, fuck neo-Sup Forums.

Thanks. I took out the trouble semi colons. Now when the program is ran and text is entered, it creates a new line and does not close. After a minute it's using 356 MB of my memory...

and sadly this isn't bait. this is the extent of my coding prowess from what I can remember of the programming class I took 4 years ago.

what do you think this does:
while (i < size) {
output += (":regional_indicator_" + words.at[i] +':');
}

#include "stdafx.h"
#include
#include
#include
using namespace std;

string output;
string words;
int i;

int main()
{
cin >> words;
output = "";
int size = words.size();
for (i = 0; i < size; ++i) {
while (i < size) {
output += (":regional_indicator_" + words.c_str()[i] +':');
}
}

cout

That is some spaghetti code.

From what I'm seeing you need to take a step back and start at square one, user. Relearn for and while loops and how they're structured.

adds each character in a string to output plus the string of text and char.

Yeah, the second line does the concatenation as you say. But what about the first and last lines, do you really need this block surrounding it? If yes, why?

The while loop will run forever as there is no chance for the i to get an increasement. Remove it

This

This is a sad thread

If as I think you want to display each word of your input with a prefix, you should rather the standard 'std::split' method to get a word array, then use a loop (use a standard iterator if you feel brave enough)

negative, each letter.

#include "stdafx.h"
#include
#include
#include
using namespace std;

string output;
string words;
int i;

int main()
{
cin >> words; // gets words from user
output = ""; // readys the output string
i = 0; // warms up the calculator
int size = words.size(); // size matters
while (i

Get rid of the while loop (also the while loop has nothing inside of it because of your ;
If you want to get the character that the i position of words just do words[i].

I took the ; out of the while loop function and added && + i to the code of the loop.
Now the console gives me
hello world
[6 blank square characters]
Press any key to continue . . .

>stray semicolon strikes again

OH MY GOD

I count 3 before you and two more calling OP an idiot.

#include "stdafx.h"
#include
#include
#include
using namespace std;

string output;
string words;
int i;

int main()
{
cin >> words; // gets words from user
output = ""; // readys the output string
i = 0; // warms up the calculator
int size = words.size(); // size matters
while (i

did I accidentally create a new open-source encryption algorithm?

what the fuck are you even trying to accomplish with that nested loop ?

IF this isn't bait, just quit now.
There is no hope for you, if you are this unaware or stupid.

it seems a lot of people here were born knowing C++ syntax. What is your nationality?

pls help im so confused