49,761 Topics

Member Avatar for
Member Avatar for Chromatic

Hi, I've been trying to get Conway's Game of Life code to work now for the past two days with no avail! The rules of the game are: Any live cell with fewer than two live neighbours dies, as if caused by underpopulation. Any live cell with more than three …

0
63
Member Avatar for pac-man

As the title says please. The issue I'm having is I've got a class which holds the vector. When I create a new instance of the class I assume a new vector is also created which results in the vector losing all its contents?

Member Avatar for pac-man
0
148
Member Avatar for balajiam

Howdy, I am creating a GUI in QT 4.5.3. I am having a problem trying to create a new subclass of QWidget. I already have several (3) other subclasses of QWidget, but when I attempt to add an additional one, the code does not compile. Here is the newClass: [CODE] …

0
58
Member Avatar for evilsithgirl

Hello. Here is my homework problem: I have a set of numbers for which i have the inorder and preorder traversal. I need to construct a binary tree from those. I have most of the code written i just need some help with a specific part. I have heavily commented …

0
54
Member Avatar for Gem74

Hi, I am trying to build a linked list, I have the following, and I get 4 error messages, ListNode, NumberList, and head undeclared, and then syntax error, please help. #include <iostream> #include <fstream> #include <ctime> #include <string> #include <cstdlib> //#include "input_data.h" using namespace std; class Node { public: int …

Member Avatar for jonsca
0
149
Member Avatar for Calhoun

Could someone show me how to compile this [URL="http://sourceforge.net/projects/torrentsearcher/files/"]source code[/URL]? I dont know much about C++ but I want to edit the file that contains the homepage so the homepage is google. [url]http://sourceforge.net/projects/torrentsearcher/files/[/url] I think the program contains 3 different peoples source code that work together in the actual torrent …

Member Avatar for Grn Xtrm
0
80
Member Avatar for guffer

i have a program which displays a certain menu, after the menu it askes for the selection from the menu....now when an integer is used it works perfectly. but when you input a character(letter) in the menu it goes into an infinite loop. anything to use to stop this behavior …

Member Avatar for Jiwe
0
135
Member Avatar for abdelhakeem

Hello ! I'm New to ASP.NET, I want to use it with C++. I installed Microsoft Visual C++ 2008 Express Edition, And installed IIS ,When i've Written my First code to Test, I got this message: [QUOTE]An unhandled exception was generated during the execution of the current web request. Information …

Member Avatar for jbennet
0
214
Member Avatar for sonygamer

Hello everyone, I'm currently having some problems with this code. I am getting many compiling errors and i was wondering if you guys could help get rid of them. [CODE]#pragma once #define CAPACITY 128; typedef int QueueElement; class Queue { public: Queue(); int empty(); void enqueue(const QueueElement & value); void …

Member Avatar for sonygamer
0
176
Member Avatar for guccitan88

Hi! I'm really new to C++ and posting to forums so please excuse any mistakes I may make. I have to write a program that simulates throwing 2 die and printing their sum 25 times, seven sums per line. I'm stuck on the "seven sums per line." Do I need …

Member Avatar for guccitan88
1
2K
Member Avatar for StaticX

Hi, I have made a small program to check if character arrays are the same(similar to string compare).This is my code so far: [CODE] // string Compare () #include <iostream> using namespace std; main(){ char a[10] = {'a','b','c','d','e','f','g','h','i','j'}; char b[10] = {'a','b','c','d','e','f','g','h','i','j'}; for(int i = 0; i < 10; i++) …

Member Avatar for Dave Sinkula
0
107
Member Avatar for nick1188

i hav installed Turbo C++ 3.0 on my pc and whenever i dbl click on TC.exe the screen turns black and after 2-3 secs the screen becomes normal i mean the compiler doesnt start same happens with borland 5.5 C++ builder pls help me as i hav no s/w on …

Member Avatar for alg
0
115
Member Avatar for BobClark

In the 80's there was a Japanese floppy format that put 1.2M on a 3.5 floppy. I believe it had 77 tracks, 8 sectors and 1024 bytes per sector. Not to mention it used a tri-mode drive which is still available today but must be used with a PC bios …

0
39
Member Avatar for Aamit

[code=c] #include <stdio.h> #include <conio.h> int main(void) { unsigned port = 0; int value; value = outp(port, 'C'); printf("Value %c sent to port number %d\n", value, port); return 0; } [/code] It gives error 8 C:\Dev-Cpp\Abc\... `outp' undeclared (first use this function) How to solve this ?? I write function …

Member Avatar for BobClark
0
571
Member Avatar for samsons17

how do i display something like this using for loop? 0 2 4 6 8 10 12 14 18 24 26 28 30 32 thank you for helping...

Member Avatar for Skeen
0
311
Member Avatar for asexe

I'm trying to write a simple "MSPaintish" program, but I can't handle this one issue. [CODE]case WM_LBUTTONDOWN:{ button = true; //save the start cords and invoke WM_MOUSEMOVE x1=LOWORD(lParam); y1=HIWORD(lParam); SendMessage(hwnd, WM_MOUSEMOVE, wParam, lParam); break; } case WM_LBUTTONUP:{ button=false; break; } case WM_MOUSEMOVE:{ if(button){ HDC hdc=GetDC(hwnd); HDC hdcmem = CreateCompatibleDC(hdc); HBITMAP …

Member Avatar for William Hemsworth
0
474
Member Avatar for kingstrider

hey guys can anyone plz xplain to me how can v make a hexagon using only for loops?i just cant figure out how to do it :(

Member Avatar for Clinton Portis
-2
87
Member Avatar for maverick405

I am trying to get user input for any ten numbers and then to print them in reverse order below is my code it executes and gives me result but I am not able to get user input... please help me.. #include<iostream> int*ReverseArray(int*orig,unsigned short int b) { unsigned short int …

Member Avatar for tkud
0
109
Member Avatar for IT seeker

salam, hope u people ll fine , any body have solved excercises of CHAP 2, CHAP 3,CHAP4 AND CHAP 5 BY D.S AMLIK book i need these urgent so kindly help me my exams r very near n i w ant to prepare them

Member Avatar for ithelp
-5
219
Member Avatar for jascase901

So far, I have only read about using void functions to take on ifstreams as a parameter. Yet I want to be able to make a single function that takes a file of numbers as a parameter, and do some calculation to each number. I can do this with a …

Member Avatar for alg
0
144
Member Avatar for debasishgang7

Hi all I want to make an Instant Messenger Client(like gtalk)with c++. any one know something pls. help me out. if you know any available web resources pls. let me know about that .... I need only the code.I dont want the GUI prog.. pls.. pls..

0
102
Member Avatar for dylank

Hi, I have a program that I am using to convert a string into binary. My current code is as follows: [CODE]int main(void) { string userInput; cout << "Enter a string to be converted:" << endl; cin >> userInput; for (int index = 0; index <= userInput.length(); index++) { cout …

Member Avatar for dylank
0
160
Member Avatar for ninreznorgirl2

I've worked with making classes, but I've never had to use a class in code that I write, so I'm having a hard time. [CODE]#include <iostream> #include <string.h> #include <iomanip> #include <ctype.h> #include "String2.cpp" using namespace std; const int MAX_WORD_LENGTH = 254; // The type definition below permits much easier …

Member Avatar for u8sand
0
204
Member Avatar for PDB1982

I have to make a program that uses Periodic Payments and Unpaid Balance (When Payments are made). I am having trouble with the mathematics with my code (I know this isn't a math forum, but I think it's more of a coding issue). The formulas, and output are below.....do you …

0
62
Member Avatar for squigworm

Hello, I am having trouble with one of my assignments and was hoping someone could help explain why this problem is occurring. The following code is set up to ask the user if they would like another transaction after they have completed the program. The first time the user inputs …

Member Avatar for squigworm
0
147
Member Avatar for juniper2009

Dear All I would be very happy if you could help me! I need to create a main() program which is be able to; * reads in a list of words and their associated meanings from the given test file(file.txt)(This file contains 10 lines) * provide an interactive menu interface …

Member Avatar for juniper2009
0
801
Member Avatar for devo_99

Hello, I am new to this C++ stuff and I am in need of assistance with this code for counting vowels. I missed a few days of class and am some what lost. I keep getting the error codes: C2228 saying it must have class/struct/union and C2109 requires array or …

Member Avatar for K0ns3rv
0
141
Member Avatar for IT seeker
Member Avatar for Ancient Dragon
0
113
Member Avatar for soccergad

This code when compiled ...saids it contains infinite loop but i don't how to fix it? can someone tell me what im doing wrong? ~thank you [CODE] #include <iostream> #include <string> using namespace std; // this program asks the user to order an ice cream int main() { string flavor …

Member Avatar for AAAKsu
0
98
Member Avatar for hakan5

Good day. Here's my code. My uncle helped me with it for days but he's now out of the country for 2 weeks. I'm looking for help to improve this project of mine with mutex and semaphores. I've never used them before and I'm a little confused. I'm running this …

0
54

The End.