49,756 Topics

Member Avatar for
Member Avatar for shywolf91

Okay I need help getting started. Here is the assignment: [CODE]Conway's Game of Life For this assignment your are to write a program, that plays Conway's game of Life. See the Wikipedia definition, if you have never played the game: http://en.wikipedia.org/wiki/Conway's_Game_of_Life. Here is how our implementation will work: (1) The …

Member Avatar for Lerner
0
257
Member Avatar for Labdabeta

Hello, I have been working with opengl and other graphics libraries and they all require the bits per pixel of the screen on initialization of a window. My question is, is there any way to get the system's preffered bits per pixel? or that of the monitor?

Member Avatar for Labdabeta
0
904
Member Avatar for Prisms

Hello everyone I'm currently working on a program that takes a student name and number of classes. Then asks the user to enter the his classes. I have most of the program done but I'm having trouble with my dynamic array for some reason it wont let me type in …

Member Avatar for deceptikon
0
235
Member Avatar for logicmonster

I am having a problem displaying random numbers, I'm trying to make a dice game where you play against the computer and the first one to 100 wins. However, my random number is never random, it always comes out as the same number. From what I understand to simply display …

Member Avatar for MrEARTHSHAcKER
0
859
Member Avatar for Labdabeta

A friend of mine recently asked me to help debug some code. I looked through it and it was riddled all over with goto statements. I know why he uses them (he used to program mainly in assembly and batch) and I tried to explain why he should try to …

Member Avatar for Labdabeta
0
415
Member Avatar for subith86

Hi, I have overloaded assignment operator like below and it worked perfectly fine. [CODE]void Test::operator = (Test& obj) { this->a = obj.a; this->b = obj.b; } [/CODE] But when I googled more about this, I could see all of the examples used a different prototype like this [CODE]Test& Test::operator = …

Member Avatar for subith86
0
132
Member Avatar for koricha

lets say i enter this Array : [0 0 1 2 3 4 5 0 0 0] what should be the output of sparse array ? thank you

Member Avatar for histrungalot
0
91
Member Avatar for FelineHazard

Hi all, I want to know if there is a smart way in c++ to test if my variable (or pointer) was already initialized? For example, I have a linked list, and I want to add an item to that list. If would like to do some thing [CODE] if …

Member Avatar for Ancient Dragon
0
7K
Member Avatar for kristen237

Which command reads one character even if that character is a blank space? :?:

Member Avatar for PrimePackster
0
206
Member Avatar for sujan.dasmahapa

I am trying to create a toolbar on my dialog, so I am creating it in the OnInitDialog() function, but the toolbar is not coming. please help me finding whats going wrong in this. Thanks Sujan [code] BOOL CDlgsViewDlg::OnInitDialog() { CDialog::OnInitDialog(); CToolBar m_FirstToolBar; if(!m_FirstToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP …

Member Avatar for sujan.dasmahapa
0
96
Member Avatar for Susmita_Sikder

hi all, when i run the program in console when i want to enter value the emp_name,basic are skipping and hra,da,gross,net are not calculating,pls give me solution where i am wrong? thank you in advance. the programme is : #include <iostream> #include<stdio.h> using namespace std; class Employee { protected: char …

Member Avatar for zeroliken
0
159
Member Avatar for pwnerboy

What we are to do is pretty much mentioned in the comments of the code. I have to make a class ARRAY, which searches a list etc... Right now I can't compile this and I'm so stuck. Please help :) Array.h [CODE] // Put comments about the class here. #ifndef …

Member Avatar for mike_2000_17
0
889
Member Avatar for jnewman3

So I have a matrix class that must run on a unix/linux server. The main is a test file that is provided by the instructor. When I compile my code in visual studio it works fine except for test 8 because I can't figure out how to return a print …

Member Avatar for jnewman3
0
1K
Member Avatar for jackmaverick1

[CODE] #include <vector> #include "Rab.h" class Envo { vector<Rab> items; };[/CODE] the error is: [ICODE]error: 'vector' does not name a type[/ICODE] I can't find ANYTHING that's wrong. Is someone else able to find it? BTW, Rab.h contains the class 'Rab'. Jack

Member Avatar for jackmaverick1
0
84
Member Avatar for kaosuvls

Ok Guys this is what I have to do: o Provide six test plans to verify the logic within the program. o Plan 1 must display the proper information for employee #1 with overtime pay. o Plan 2 must display the proper information for employee #1 with no overtime pay. …

0
72
Member Avatar for Snow_Fox

I need to take in a sentence and break it up based on the individual words. I've been googling for probably 30+ minutes to 60 ish and I feel it's time I get some help on this one.. Ideally, there should be a way to break up a string possible …

Member Avatar for Snow_Fox
0
247
Member Avatar for chuyauchi

I have problem on my program. Can anyone help me to fix it and explain to me a little bit? [CODE] #include <iostream> #include <iomanip> using namespace std; void displayResult(); void welcomeMessage(); void game(); int main() { welcomeMessage(); displayResult(); displayResult(frequency, expected, intRepeats); } // end main void welcomemessage { cout …

Member Avatar for Ab000dy_85
0
120
Member Avatar for _Nemesis_

Hi guys, Brief Background: I'm currently working on a project in which I wish to create an autonomous game agent capable of traversing 3D environments. To do this I would like to implement a custom path finding algorithm that works with a navigation mesh. The Problem: I'm currently looking at …

Member Avatar for _Nemesis_
0
169
Member Avatar for rfrapp

I'm trying to finish this assignment for class, but I've got a problem.It seems as though my code will always make the new generation blank, and I'm not sure why. If you could read my code, then I'd greatly appreciate it. Thanks! [CODE] // Life.cpp : Defines the entry point …

Member Avatar for StuXYZ
0
246
Member Avatar for SCass2010

Hi everyone :) At the minute I'm working on some stuff learning c++ and was wondering if ayone could offer some advice... Say I have a pile of objects that need to be created (for example say, a Log object, XML parsers object, and a command line parser object). In …

Member Avatar for Bench
0
195
Member Avatar for MrEARTHSHAcKER

Hi, When writing a little code for showing ASCII characters in C++ and C, the only difference is when I do it in C++ I print until char ( or integer ) reaches value of 127, and in C I print until it reaches 255. Why it's like that? Thanks!

Member Avatar for MrEARTHSHAcKER
0
173
Member Avatar for Snow_Fox

So, I'm doing a program that is suppose to convert a sentence into pig latin. I figured I would make a function which would handle the individual words, then I'd work on breaking up the sentence into individual words. I keep getting the error that my String Subscript is out …

Member Avatar for Snow_Fox
0
1K
Member Avatar for nine9hours

I made the following program, but now i am getting an error. I searched for error almost 3 hours but worthless. I want to discuss the problem with you people. I am getting the error: [B] expected class-name before '{' token[/B] #ifndef ASKDIALOG_H #define ASKDIALOG_H #include <QDialog> #include "umerwindow.h" namespace …

Member Avatar for ravenous
0
252
Member Avatar for faraz ahmad

Hello All, i have written a program to read data of Persons from a file and fill the data into a dynamically created array of Persons. i am geting error in line 28 plz help the 1.txt file can be assumed as:(first line is the no of persons, then names …

Member Avatar for ravenous
0
319
Member Avatar for caltech

int findLowest(int arr[]) Is passed the five accident totals as an array of ints. It determines which is the smallest and returns the subscript for that array element. The main function declares two arrays, a string array containing the names of the boroughs and an int array which will hold …

Member Avatar for caltech
0
221
Member Avatar for KRUX17

Hello, I would like to know how you can keep running a function over and over again, so that it can keep adding the stored value. For example If Bob uses a program to purchase a ticket, lets say that Bob purchases 5 tickets out of 55 tickets (There's only …

Member Avatar for irre
0
196
Member Avatar for radiat
Member Avatar for Kathyrine

I wanna convert an integer to a character then i will store it later to the index of a c-string...... something like... int res=123 then it will be putted in.... var[0] = 123 where in var is a cstring, and here 123 is now a char type..... here is what …

Member Avatar for Software guy
0
198
Member Avatar for jonnyboy12

Hello all. i might have posted about this recently but, i have done much research and refined my research and am close to a solution. I am trying to use the click of a ahref link with a variable tacked on the end, to send a message to one of …

Member Avatar for jmichae3
0
186
Member Avatar for Buffalo101

Hi, I'm trying to create a thread for running some tasks. I copied the code from an old console application (which compiles fine), but can't figure out why it's not working now. I have searched for the error code and came across this suggestion: "Are you passing the name of …

Member Avatar for jmichae3
0
678

The End.