User forums > Using Code::Blocks

while loop segmentation fault

(1/1)

multiabhay:
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

ollydbg:
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.

Jenna:

--- Quote from: 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.

--- End quote ---
Topic locked therefore.
And please use code-tags (#) if you paste code in the forum.
Thank you!

Navigation

[0] Message Index

Go to full version