Trying to Call on an Array

solved
Last edited on
The problem I see is that, you're comparing garbage values to actual values.

cUsername != user[1][1]

You haven't initialized cUsername to anything, nor pPassword.

Another problem is that you don't quite know how arrays work. If you create an array, say the size of 3. int arr[3]. You will reach it's content by index 0-2, not 1-3.

int arr[2] = {2,3};

if you want to print out 2, you do arr[0], and arr[1] for printing out 3.
Last edited on
I tried initializing cUsername and cPassword but it didn't work. So I just took the initialized values off.


The positions I called on are legit...? Look at the array.

Password is on row 2 and username is on row 1. It's a multidimensional array...

I know that it starts at 0 however the size begins at 1.

I was trying to call on the username "jco" and the password "1337".

PS; I added the global variables for the array dimensions.

Thanks for trying though. >.<
Last edited on
FOUND THE PROBLEM BUT I DON'T KNOW WHY IT WORKS.

I put lines 73 to 80 in the while loop and it works...?

I don't get why it doesn't work outside the while loop.
Topic archived. No new replies allowed.