Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: multiabhay on December 26, 2014, 06:14:28 am

Title: while loop segmentation fault
Post by: multiabhay on December 26, 2014, 06:14:28 am
Hi guys!
I am haivng a little problem in code::blocks
here is the code:

#include <iostream>
#include <string>

using namespace std;

int main()
{

    string list[] = {"one", "two", "three"};



    int index = 0;
    while(index < 4)
    {
        cout << list[index];
        index ++;
    }



   

    return 0;
}


Getting Error : Segmentation Fault .


I am using Linux mint 17.1

Title: Re: while loop segmentation fault
Post by: ollydbg on December 26, 2014, 07:01:14 am
This question is a general programing question, so it violates our forum rule. So, I suggest try ask in a suitable forum to seek help.
Title: Re: while loop segmentation fault
Post by: Jenna on December 26, 2014, 11:42:39 am
This question is a general programing question, so it violates our forum rule. So, I suggest try ask in a suitable forum to seek help.
Topic locked therefore.
And please use code-tags (#) if you paste code in the forum.
Thank you!