49,756 Topics
| |
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 … | |
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? | |
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 … | |
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 … | |
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 … | |
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 = … | |
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 | |
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 … | |
Which command reads one character even if that character is a blank space? :?: | |
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 … | |
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 … | |
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 … | |
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 … | |
[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 | |
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. … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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! | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
Hi, how could i check is a number an int or a float? | |
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 … | |
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 … | |
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 … |
The End.