105 Topics

Member Avatar for
Member Avatar for mystra

Hi guys, I need some help with a particular part of a C++ DirectX game. My course has tasked me with creating a game similar in look and function to the old missile command arcade game (something like [this](http://www.youtube.com/watch?v=t-cD0XdyQ7s)), however I have hit a bit of a wall in terms …

Member Avatar for Chase.Dangerfield
0
252
Member Avatar for futureeconomist

Not sure if I posted correctly. I am trying to do a bubble sort on a 2D array. I want to sort the array by columns. I get it to compile but it doesn't run correctly. #include <iostream> using namespace std; int main() { int array[10][10]; int col, row; cout<<"Enter …

Member Avatar for futureeconomist
0
5K
Member Avatar for daniel.moore.5099940

I need some serious assistence with finding the solution to this problem, it has plagued me for some time now and im just not getting the big picture. I need to move the elements in a 2d array according to the user input, but the way i have figured out …

Member Avatar for Labdabeta
0
389
Member Avatar for daniel.moore.5099940

Hey everyone, i need help with this program im doing for a class, now i havent used c++ in a while so thats why im considerably fresh in all this. any at all help would be greatly apprecietated. ALso i can NOT spell to save my life. the problem states …

0
142
Member Avatar for Fedhell

Hey guys, its been quite a while since ive posted here :-( Im making a game in java (nope not for school, just for fun) Anyway, ive created some logic for an enemySuicideBomber(spaceship game, prolly not what your thinking) to select the closest location. It works for the most part, …

Member Avatar for NormR1
0
215
Member Avatar for ShEeRMiLiTaNt

Hello, I need to write a program to take in a name (max 101 characters) and out store in into an array so that I can output it like a list. These 2 programs are apart of a bigger program that keeps asking if you want to add another name …

Member Avatar for VernonDozier
0
320
Member Avatar for sandorlev

Hey guys! I've started writing a 2d platformer game some days ago, and I'm really enthusiastic about it, but I already failed to live up to my own expectations: I just cannot possibly think of a way I could make my character jump. I used the MVC desing is why, …

Member Avatar for 3e0jUn
1
337
Member Avatar for charles.haselden.3

I am trying to build a tic tac toe program for an assignment. My trouble is making a dynamic array, I am new to c and my understanding of pointers and malloc is still very limited. I would like a resource I could read or an explination of how malloc …

Member Avatar for deceptikon
0
261
Member Avatar for VaibsBrainyStud

i am having problems in solving a few of my computer problems in 2d arrays.. for eg:- 1 2 3 4 8 7 6 5 9 10 11 12 16 15 14 13 what would be the javascript to print this?? please help..its urgent :)

Member Avatar for DavidB
0
99
Member Avatar for Chuckleluck

Hello, Over the past couple of days, I've been struggling with getting collision detection to work for my game, a 2D sidescrolling platformer, made with SFML 2. This is example code using my most recent method of collision detection, although it has some flaws: // main.h #ifndef MAIN_H #define MAIN_H …

Member Avatar for Chuckleluck
0
625
Member Avatar for yup790

I have been using XNA recently and discoverd a major difficulty: when designing levels you have to spen ages pre planning exactly where sprites/objects will go. To solve This problem I had an idea for a game engine/level editor that just imports sprites, creates variables for the sprites and has …

Member Avatar for Akill10
0
183
Member Avatar for zenitis

I have a declaration of a 2d vector: vector<vector<int> > data; I want to add several times in an server-client problem an array of 25 elements. I donnot know how many times i must add that array(which changes its values). How can i add that element to the vector without …

Member Avatar for deceptikon
0
175
Member Avatar for rover100

Hi guys, im new to these forums and would like some help with two problems im having in my program to make crossword The crossword requires me to read 5 inputs in one line. word row column direction clue Problem 1- input I wish to getchar the first word while((answerInput[count][i++]=getchar())!=' …

Member Avatar for rover100
0
162
Member Avatar for nathaniscool99

Hello I am looking to read a file into a 2d array to show which spaces have been taken/ haven't taken whiey will show a # if not taken and a T if taken, so far I just have a text file I created which shows like this: T # …

Member Avatar for adityatandon
0
8K
Member Avatar for ariez88

Hi, Below is the declaration at class level. int[] PossibleValues = new int[6]; int[][] JaggedArray = new int[50][]; int JaggedVar = 0; Then in a function, I am assigning PossibleValues array to Jaggedarray like this. [PossibleNumbers is a function that returns an array of possible numbers for a cell in …

Member Avatar for thines01
0
163
Member Avatar for Z33shan

hello :) i'm looking for an algo to find out all possible combinations of a 2d array entries, wich are (Tasks x Processors). i.e, i have to find out all possible schedules to schedule tasks against processors. numbers of tasks and processors are variable. Suppose : ............P1.......P2.......P3 .................................... T1........3 ........6..........4 …

Member Avatar for raptr_dflo
0
295
Member Avatar for Kitt3nkat

I am trying to create a 2d table that asks for user input to create table size, adds all the numbers across each row, and creates the next row by multiplying by the first row. Here's what I have and it's now giving me an "Exception in thread "main" java.lang.NullPointerException" …

Member Avatar for NormR1
0
877
Member Avatar for ttugates

Hi, I am writing a program that displays a 2D array of strings, (non jagged) onto a windows form using Visual Studio 2010 and C#. For example: string[,] fds = new string[,] {{"ant", "aunt"}}; I attempted using the dataGridView controll, dataGridView1.DataSource = fds; but, get the length of the value, …

0
90
Member Avatar for skit091

Main form coding ;- using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace CS3DGeneratorSample { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void link_Image_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { OpenFileDialog.Title = "Open Image"; if (OpenFileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) …

0
94
Member Avatar for dheredhere

Hey guys! I have an encryption project for school and i have to randomly generate a 3x3 matrix. I know how to assign the values to the 2d array but i am unsure how to return the array. I know it is possible to return a vector of a vector …

Member Avatar for deceptikon
0
304
Member Avatar for JOSheaIV

So first of all let me say I am pretty new to C++ and find it very difficult to learn (especially when compared to say C#) Anyway I am working on a program that requires the use of a 2D array or a similar container. After talking with a professor …

Member Avatar for JOSheaIV
0
3K
Member Avatar for marines10

I'm making a connect 4 like game in Java and everything I choose a column to drop the piece it goes where I want it to however, when I want to drop a piece on top of that I, my program throws an error and makes me select another move. …

Member Avatar for marines10
0
436
Member Avatar for nandosss

I need help creating a two dimensional array in mips assembly. I am new to this kind of programming and i do not know how to approach the problem. i have to create an array max size 20 by 20 and then fill it up with data entered by the …

Member Avatar for Ancient Dragon
0
4K
Member Avatar for Z33shan

hello :) i'm using MFC SDI, & i'm less familiar to it. i need to know, 1: i have found a way of printing a string as [CODE]pDC->DrawText( " Task still pending!!! ", &rect , DT_PATH_ELLIPSIS );[/CODE] but i want to know, how can i print a 2D-Array in MFC …

Member Avatar for Ancient Dragon
0
385
Member Avatar for themenucha

Hi!!! I'm trying to pass 2d array to function and i can't. In general i'm trying to print chess board in action. The board is an integer.I need a function that gets 2d array in specific place and returns correlatedm char. const int pawn = 1; const int rook = …

Member Avatar for themenucha
0
348
Member Avatar for km2011

i want to make random numbers for x[row][col] that row =10 and col =10, but my problem is: how i fix random numbers of n[col]=5; here is my code: public static void main(String[] args){ double[][] x= new double[10][10]; int row,col; int n[]={0,0,0,0,0,0,0,0,0,0}; for(row=0; row<10; row++ ){ for(col=0; col<10; col++){ if( …

Member Avatar for km2011
0
2K
Member Avatar for Halogen1

Hi: I wasn't able to find the exact solution to my problem on Daniweb, although there are several posts regarding the game of life. This situation came the closest: [url]http://www.daniweb.com/software-development/cpp/threads/242338[/url] My situation is a bit different because I HAVE to use a combination of functions and a class in the …

Member Avatar for Halogen1
0
489
Member Avatar for matrixcool

Hello, I have a file and this how it looks like: 6 {a, b, c, d, e, f} 1 1 1 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 1 1 1 1 0 1 1 …

Member Avatar for matrixcool
0
244
Member Avatar for Goshutu

Hi, i am doing a multiple-file project and i come across a difficult obstacles. I want your help, DaniWeb readers on this problem, which i find very strange: [CODE] #include "stdafx.h"//i have included vector header here #include "globals.h" #include "functions.h" using namespace std; #ifndef CPIECE #define CPIECE class CPiece { …

Member Avatar for Goshutu
0
330
Member Avatar for swissknife007

[CODE] <?php echo date("Y/m/d") . "<br />"; echo date("Y.m.d") . "<br />"; echo date("Y:->m:->d")."<br>"; echo("hello") ."<br/>"; $app5=5; echo($app5); $baby="going"; echo("$baby i love to "); //echo ($baby$app5); if($app5==5) echo "dance"."<br>"; echo strlen("dance"); echo strpos("dance","h"); switch($ab=1) { case 1: echo 1; case 2: echo 2; default : echo "default"; } $a = …

Member Avatar for cereal
0
238

The End.