~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

learn -> grasp

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Sun ? Believe it or not, its a star.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Arrays in C are passed by reference i.e. meaning that you only need to pass around the array address to the function and that array will be accessed and used in a normal way in that function.

Change you function call to values ( x ) ; and you should be alright.

Oh, and btw, its int main (void) and not void main (void) .

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

backstab you. So

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

It really stands

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I'm Like A Lawyer With The Way I'm Always Trying To Get You Off - Fallout boy

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

FLOATING ghosts and singing scorpions eat popcorn while kissing a roaring lion.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You get to ride a pony

I put in a twig.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

chains -> reaction

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Wild dogs and singing scorpions eat popcorn while kissing a roaring lion.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

friends but not

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You get to <head> bang.

I put in a set of speakers.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Him or her ? Whom are you referring to.. ?

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

bill -> gates

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

read your actions

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

This is your life -> Switchfoot

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Invisible dogs and stinging scorpions eat popcorn while kissing a roaring lion.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

cell -> phone

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

the case with

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

if i initialize the array in main() or constructor, the other functions which use that array give error : 'array not defined'.

Thats because they can't see the array or the array is out of scope for them. Post the code which displays this peculiar behaviour and we will see what can be done...

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

The first sequence you posted has a distinct pattern, but I see no repeating or logical pattern in the second sequence ? Try to put down your thoughts in a more concise manner and you would yourself know the algorithm.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

How are you defining bugs?

The way they can deliver maximum humour... ;)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Actually it was a mistake to post that there, I meant to post it in the blogs window I had open. I'm actually not experienced enough to be cocky. The sarcastic perception is direct result of my post for the newbie. Sorry, I wish I could delete it or edit it.

LamaBot

Oh, you are gettting me all wrong. I was just joking. It really was an interesting read.

Do you seriously want to edit it out ? If so, I would need to fill it with something, so that the continuity is not broken.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You get your house painted with graffiti.

I put in a break; stmt.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

kind of person

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

movie

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

my lord -> your highness

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

What makes you think this?

There are a lot of people for whom forums are "completely new". They don't even know that the things which they are reading are called threads and that they themselves can create them.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I guess Lamabot's reply should be used as a template for those who are in need of ready code.... its less sarcastic, snappy and cocky. ;)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Invisible dogs and sleeping scorpions eat popcornswhile chasing a ROARING lion.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

trousers -> browsers

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

to the future.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

shovel

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Jokes are really an intergal part of a clown's life.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You get to hear Linkin Park's album Meteora.

I put in a chair.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

very notion of

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

zip -> pants

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Barking dogs and sleepingscorpions eat unicorns while chasing a limping LION.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

That smell - Three doors down

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You get a gold mine.

I put in a stopwatch.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

to hide in

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

So atleast try out something you have in your mind and post it here. Help will automatically ensue..

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

is a way

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Your sentences tend to be really cryptic.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

1 * 100 + 2 * 100 + 3 * 100 + 4 * 100 => 1000

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Read the Equality section of this article.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You get to fly for fun.. ;)

I put in a dynamite.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Two problems I can see:

• Your memory allocation is not proper. Each of your rows share a common vector variable because of the stmt:

vector<int> v(n);
vector<vector<int> > data(n,v);

Here the memory for each inner row is getting allocated only once and your two dimensional matrix gets populated with the same vector.

You need to change it to:

vector<vector<int> > data(n,vector<int> (n));

So that the memory allocation occurs for each row rather than only once for all rows.

• Your logic is skewed. The line :

i=0;
    j=n/2;
    for (int k=1; k<=nsqr; ++k)
    {
        data[i][j] = k;
        i--;

is bound to produce an out of bounds error since you are decemeneting i which already is zero, resulting in its value becoming -1, which is not a valid index.

Better use size_t instead of int for index variables to make sure you don't invade the out of bounds exception land. (assigning -ve values to such variables leads to a warning which is fairly easy to decode).

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You get some stupid people fighting with glowing tubelights.

I put in a dinosaur.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Planet scare I gave you, didn't I ?