105 Topics
|
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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, … |
|
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 … |
|
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, … |
|
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 … |
|
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 :) |
|
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 … |
|
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 … |
|
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 … |
|
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())!=' … |
|
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 # … |
|
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 … |
|
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 … |
|
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" … |
|
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, … |
|
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) … |
|
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 … |
|
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 … |
|
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. … |
|
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 … |
|
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 … |
|
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 = … |
|
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( … |
|
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 … |
|
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 … |
|
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 { … |
|
[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 = … |
The End.