const int capacity2 = 120;
	    int rows[capacity2];
		for (int i = 0; i < capacity2; i++)
		{
		if ( x == 11)
			{ rows[i] = 1;
			  break;
			} 
		else if ( x == 13)
			{ rows[i] = 2;
			  break;
			}
		else if ( x == 15)
			{ rows[i] = 3;
			  break;
			}
		else if ( x == 17)
			{ rows[i] = 4;
			  break;
			}
		}	
			cout << "row = "<< rows;

Can't understand why the row answer isn't giving me the correct output instead if gives me rows = 0x0012fd70. Again any help would be very appreciated!!

Sorry solved the problem myself. Justed needed rows[0] instead! my bad!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.