I have to create an array of 10 strings and put 10 quotes in each. I also have to create a while loop which I don't know where to start. I am having trouble compiling and I can't find any of this online.. Its driving me crazy - I am new to programming.
It says bad array decorator when it says string Quote[9]
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
#include "stdafx.h"
#include <string>
string Quote;
using namespace std;
int main()
{
// String Array
string Quote[9];
// Attach Values
Quote[0] = "Don't cry because it's over, smile because it happened.";
Quote[1] = "Be yourself; everyone else is already taken.";
Quote[2] = "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe.";
Quote[3] = "A room without books is like a body without a soul.";
Quote[4] = "You know you're in love when you can't fall asleep because reality is finally better than your dreams.";
Quote[5] = "You only live once, but if you do it right, once is enough.";
Quote[6] = "If you tell the truth, you don't have to remember anything.";
Quote[7] = "A friend is someone who knows all about you and still loves you.";
Quote[8] = "To live is the rarest thing in the world. Most people exist, that is all.";
Quote[9] = "Without music, life would be a mistake.";
return 0
}
Comment