49,761 Topics
| |
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 … | |
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? | |
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] … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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++) … | |
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 … | |
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 … | |
[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 … | |
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... | |
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 … | |
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 :( | |
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 … | |
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 | |
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 … | |
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.. | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
which c++ compiler is easy n best? i want to download........... guide me...... | |
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 … | |
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 … |
The End.