49,761 Topics

Member Avatar for
Member Avatar for eng hassan

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 …

Member Avatar for eng hassan
0
113
Member Avatar for Ryan61343

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 …

Member Avatar for Ryan61343
0
89
Member Avatar for Talguy

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 …

Member Avatar for Aranarth
0
114
Member Avatar for waleed-707

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 …

Member Avatar for waleed-707
0
4K
Member Avatar for chrisdod

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 …

Member Avatar for Ancient Dragon
0
111
Member Avatar for iamcreasy

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, …

Member Avatar for iamcreasy
0
156
Member Avatar for robski

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 …

Member Avatar for robski
0
113
Member Avatar for iamthwee

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 …

Member Avatar for iamthwee
0
277
Member Avatar for Obsidian_496

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 …

Member Avatar for Obsidian_496
0
96
Member Avatar for carrythe1

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 …

Member Avatar for carrythe1
0
1K
Member Avatar for RAVI KOTHARI

sir,can you pleaz tell me why reference over reference is not allowed?

Member Avatar for jonsca
0
34
Member Avatar for Dows

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 …

Member Avatar for mrnutty
0
150
Member Avatar for jen5376

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. …

Member Avatar for jen5376
0
147
Member Avatar for leesho

[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; …

Member Avatar for leesho
0
137
Member Avatar for igorg95

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 …

Member Avatar for corby
0
225
Member Avatar for gcardonav

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 …

Member Avatar for gcardonav
0
137
Member Avatar for igorg95

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 …

Member Avatar for igorg95
0
134
Member Avatar for red999

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 …

Member Avatar for Ariste
0
98
Member Avatar for sblass92

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 …

Member Avatar for Aranarth
0
158
Member Avatar for Ayaat Monem

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 …

Member Avatar for daviddoria
0
72
Member Avatar for hogat

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 …

Member Avatar for hogat
0
76
Member Avatar for Ral78

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 …

Member Avatar for Ral78
0
148
Member Avatar for C#Coder

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 …

Member Avatar for sgtjoebear
0
2K
Member Avatar for wade2462

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, …

Member Avatar for wade2462
0
342
Member Avatar for Kanoisa

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 …

Member Avatar for Kanoisa
0
163
Member Avatar for MATLAB2007

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 …

Member Avatar for avarionist
0
101
Member Avatar for Graphix

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) { …

Member Avatar for Graphix
0
2K
Member Avatar for noobday

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 …

Member Avatar for noobday
0
89
Member Avatar for Ayaat Monem
Member Avatar for abhimanipal
0
277
Member Avatar for mimis

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 …

Member Avatar for Ancient Dragon
0
119

The End.