49,761 Topics
| |
i want the charcter i display in the grid to move upwards when i press 'w' & downwards when i press's' & right when in press'd' & left when i press 'a',,,,i have written a code that doesnt work can anyone help me to find out what is the wrong … | |
I am writing a program for connect four I have all the code written and all works fine i was wondering however if anyone could offer any advice on a function to determine if a player has 4 or more in a row cause i just cant seem to think … | |
I have two questions one is kind of a newbie question and the other one is a little more advanced. I have been coding C++ off and on for the past couple of years as a hobby and a little for my EE classes. I usually in my class reference … | |
Hi all, I declared a vector of pointers in a header file named "bug.h" [CODE]#ifndef BUG_H #define BUG_H #include <vector> #include "board.h" #include "prey.h" class Bug: public Prey{ public: Bug(Board& boa); Bug(int x,int y,Board& boa); void breed(Board& boa); int getx(); int gety(); }; typedef Bug* Bugpt; std::vector <Bugpt> Bugarr(6); void … | |
i am just learning C++ again after about 5 years of not learning it so i decided to use Visual C++ but learning is a bit hard at the moment, understanding everything and llearning to use everything anyway i need help or need to know why this code won't work … | |
This class when, it is not integrated with the main program, shows the following error....and I have no idea what it is trying to say.. :( :( [code] #include "character.h" Character::Character(DrawEngine *de, int s_index, float x, float y, int lives, char up_key, char down_key, char left_key, char right_key) : Sprite(de, … | |
Hi all. I had a software exam the other day and one of the questions was : Define a new data type called PC that contains data both about the computer and the monitor. The computer contains how much RAM (integer) and the processor speed (floating point number). The monitor … | |
| Hi, Let's say I have a csv file like such:- [b] part,text,true,quantity [/b] [code] [COLOR="Green"]371336959,-New DDM Part-,Y,1[/COLOR] 449127604,-New DDM Part-,Y,1 808635064,-New DDM Part-,Y,2 [COLOR="Red"]189657,-New DDM Part-,Y,2[/COLOR] 319330767,-New DDM Part-,Y,1 [COLOR="Green"]371336959,-New DDM Part-,Y,1[/COLOR] [COLOR="Red"]189657,-New DDM Part-,Y,1[/COLOR] [/code] Now I want to remove duplicate parts and add the quantities together whilst PRESERVING … |
Hi. I'm working on a binary tree home assignment and I have a problem. Initially my program used global variables. I decided to change that and declare variables inside functions (various reasons, you probably understand why). I want the program to run without using global variables. However, I can't figure … | |
Hi, I have a form application that has a number of pictureboxes. As the program runs it changes the pictures in the boxes depending on buttons pressed on the form via a function 'updateGUI'. The program runs for a limited period and eventually i get an error: An unhandled exception … | |
sir,can you pleaz tell me why reference over reference is not allowed? | |
Dear all, I'm creating a set of functions to handle stl vectors. Some are useful for achieving my goals. I'm coding some other just for fun. But after some coding I see I cannot compile them propperly. One example would be a vector print function which prints all the elements … | |
Im trying to make a program that generates all the verses of the song "The Twelve Days of Christmas" using recursion (its homework). Ive read what the book says several times, researched online, etc etc. Im not looking for anyone to do the homework for me...I just need some guidance. … | |
[CODE]#include<iostream.h> //is used so it will display output to the user and that input can be read from the keyboard #include<iomanip.h> //is used so that the user can format input using namespace std; int main() { int qty1; cout << "Please enter the quantity of Televisions: "<<endl; cin >> qty1; … | |
i'm making this spanish conjugator for class. and i cant seem to get how to make multiple letter variables. can anyone tell my what i'm doing wrong? it's kinda urgent. here is the code so far. #include <iostream> using namespace std; int main () { char verb; cout << "Enter … | |
Hi guys: I wrote this simple code to read a series of numbers from a list and then do some simple aremathic with it. I am not certain where the error could be, I read the code upside down and still can understand where the error lies. Any help would … | |
is there a way for me, using a mac to compile a c++ program to work on windows? or could some one with a windows computer compile this code and send it to me somehow?? #include <iostream> #include <string> using namespace std; int main () { char* verb = new … | |
This is a silly question. I have been working with pointers for almost two quarters and this question never occurred to me until today when I wrote up some code and my IDE screamed at me about it. Oddly enough, 99% of the time I get it right so this … | |
Goal is to create a simple class that can be used for GUI buttons. My question is how can I define a function variable, and then when constructing a 'button' define which function should be called when clicked. This obviously isn't right, but just to get the idea: [CODE] class … | |
Hello everybody ! I want to write a program that reads from the user a number then prints it such in the Elevator if the input is 1, the output will be like that : * * * * * It seams to use an array 2D, how can I … | |
HI i want find record in file and null it . i find it and set file pointer with --fsetpos--befor i use --fwrite-- . all thing id correct but record not change and fwrite write record at end of file i use ftell() and fseek() but i get again this … | |
I'm working on a program that will get a list of words from the user and rearrange it in alphabetical order. So far it works but I think it may have some memory issues because I was testing an alternative way of asking the user how many arrays will be … | |
I'm trying to write a simple file output program for my class. The error I recieve when I try to compile in VS .net 2003 is the following. [I]fatal error C1083: Cannot open include file: 'fstream.h': No such file or directory[/I] The code to my program is extremely straight forward … | |
Okay, this just makes me feel stupid. I'm pretty good at programming for the console so I figured I would try a Win32 program. Apparently I'm stupid because I cannot even compile hello world. Heres the code I copy and pasted. [CODE] #include <windows.h> int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, … | |
Heya Thanks for taking the time to look at this, i would like some people to review my curent project which is written in c++ using visual studio 2008. Although in VS08 it does not use anything that makes it dependant on it (i dont think) i just wanted to … | |
I am trying to capture keystrokes, and have been able to for all letters, and numbers, but i cant capture keystrokes such as ' ;, @, -, _, +, =' e.t.c. I have tried looking up their decimal code from the ASCII table, but that does not work. In the … | |
Hey everybody, I am currently having difficulty using GetOpenFileName() and GetSaveFileName(). The keeps returning the error " undefined reference to `_GetOpenFileNameA@4' ". I can't seem to find a fault in my code, so is it the compiler or is it the code? I am using CodeBlocks. [CODE]void DoFileOpen(HWND hwnd) { … | |
Hi, I am currently programming using c++ language and want to take advantage of some very useful wolfram mathematica functions : By that, i mean sending external datas or using symbolic calculus, applying required functions, and taking the result back in an array of my c++ program for example; I … | |
Hi, how can i save the text from a file in a 2d array? For example the file will be like: ebjevjhb tgbvtrjk trjgbj tgrrktgtr kgtrl tkltrg t feg ergfern gn sdcx xssw And i want to save this in a char 2d array like: char str[3][100] so str[0]="ebjevjhb tgbvtrjk … |
The End.