49,761 Topics
| |
[code] #include <iostream> //For console output #include <windows.h> // WinApi header using namespace std; #define EMPTY_CELL 177 #define CURSOR 1 #define TAIL 219 #define NUM 6 class Room { private: public: bool visited(); bool active(); Room(); // Default Constructor Room(bool visited, bool active); // Overloaded Constructor Room(const Room& node); // … | |
The problem I'm having is with overloading the >> operator so that I could read data from a file directly into a class's member data. Everytime I run through the program, it just crashes. when I look through the debugger, it brings me to some page of crazy code. So … | |
I am writing a program to prove if a code is a Palindrome or not and must use stacks. I have written a code below that compiles, but when I run it, it outputs the word in an a stack view, but does not follow the rest of my program … | |
I use C++. .I have a big problem. I need to divide data from the strings and put them into the vector.In this case, let's say i have two strings and each string will end with '\n', how will i read the characters for each string without ignoring the newline? … | |
As part of my programming class, I need to go through the tutorials, and make my own program that shows off whats in the tutorial, I'm done with the class tutorial and have it all done except one part. The volume part doesn't return the right value and I don't … | |
Hi, first post :cheesy: I'm currently a complete noob to c++ programming and am currently reading the book "Beginning C++ Game Programming" written by Michael Dawson. I had the problem where i complied and ran the following source code: [code=c] #include <iostream> int main() { std::cout << "Game Over!"; std::cin.ignore(std::cin.rdbuf()->in_avail() … | |
Hello to all programmers: I have been working on the following program but I am encountering some difficulties any help whatsoever would be greatly appreciated. My instructions are: Write a c++ program, 1. Prompts the user for a choice of encrypt or decrypt, prompts for the input and output filenames … | |
I'm trying to compile my program using library functions I created. I can't figure out how to get it to work. I'm going to attach my files so if someone could help me that would be great | |
hey guys, i need some real bad help for my c++ project......i'm making an analog clock in C++ graphics.........n my clock works just fine, except for the fact that i haven't as yet added an hour hand, :rolleyes: and yeah..my minute hand runs almost as fast as my second hand.:lol:.....plzzzzzzzzzzzz … | |
[code] [COLOR=#0000ff]int[/COLOR][COLOR=#000000] **Point_in_Range;[/COLOR] sub_vol_size_xi =512; sub_vol_size_yi =512; sub_vol_size_zi=512; Point_in_Range=([COLOR=#0000ff]int[/COLOR]**)malloc([COLOR=#0000ff]sizeof[/COLOR]([COLOR=#0000ff]int[/COLOR]*)*(sub_vol_size_xi*sub_vol_size_yi*sub_vol_size_zi)); cout<<"Get Here1"<<endl; [COLOR=#0000ff]for[/COLOR](j=0;j<sub_vol_size_xi*sub_vol_size_yi*sub_vol_size_zi;j++){ cout<<j<<endl; Point_in_Range[j]=([COLOR=#0000ff]int[/COLOR]*)malloc([COLOR=#0000ff]sizeof[/COLOR]([COLOR=#0000ff]int[/COLOR])*3); } [/code] What is the memory problem.... been stuck on this for a little while now. thanks in advance | |
Hello World, Can someone help me find this error. I'm trying to code for Johnny's Resturant. I need to show the items, allow the customer to select an item and calculate the bill. This is what I've done so far: I need some assistance with the program... I've sedn how … | |
Hello Everyone, My name is olams and i am new to this website and C++ in general. I am having real difficulty in this class. Can someone please tell me how to find the number of digits in number using Visual C++. Net or C++. I really need help. Any … | |
Hi all, I want to run my c++ program in the background and at certain point, I want to pass a variable into the program, so that I get the result stored into the output file. I would like to know if its possible to do this. Thanks a lot … | |
this the actual assigment: Write a program that will read in a line of text and output the number of words in the line and the number of occurences of each letter. Define a word that will be any string of letters that is delimited at each end by either … | |
I am writing this program that reads in lines from a txt file into an array. Some lines start with a number and some don't. Problem is that I need help on how to display the lines that don't start with a number. Examples of txt file: [CODE]Students 3 Girls … | |
I am very new at this, and I am sure this is a really basic question but if I don't know, then I have been taught to ask .... even if it is dumb. Can a character be added to an interger. I feel confident I would get a syntax … | |
As you may already know im working on a program that analyses a file given by the user, i want to create a word count feature. How would i go about doing this, i mean how would i distinguish what is exactly is a word and be able to incorporate … | |
How can you make a program ends when the user enters the string "terminate"? | |
Hello to all [URL="http://www.daniweb.com/techtalkforums/post318952.html#"]programmers[/URL]: I have been working on the following [URL="http://www.daniweb.com/techtalkforums/post318952.html#"]program[/URL] but I am encountering some difficulties any help whatsoever would be greatly appreciated. My difficulty is that when I run the program, it does not perform the encryption nor decryption on the file I type in. Is something … | |
I'm totally new to programming, but have been getting by fine so far. I'm taking a highschool programming class, and am trying to do some of my assignments from home. We've been told to work with <iostream.h> for our input and output, but for some reason, I get an error … | |
Hi Pls help me to write first non-repeated char in string . eg. If string is abcda then first non-repeated char is b . I want an efficient algo / program which will traverse the string only n times . I don't want to use hash which set bit if … | |
I have this program I have to write about adding binary numbers. Here is the write up: "Defining a binary number as int binNum[8]; write a C++ function void binaryAdd(int* sum, int& cBit, const int* bin1, const int* bin2) to compute sum as the sum of the two binary numbers, … | |
hi, hav jsut started with learnin c++ programmin, am using the dev c++ compiler(if u knw a better one plz tell me)...i just learnt basic graphics using the library graphics.h. I hav heard its a very old library but i dont knw of any other one's, so plz guide me … | |
ok my program works the only thing i cant figure out how to do is, print the sum, average and the numbers (entered) in reverse order. after it tells my the real sum and average. her is what i got so far [CODE]#include "stdafx.h"; #include <iostream> #include <string> using namespace … | |
Hello... I was given this forum address by a friend, and I am in need of some C++ help. I have just recently began learning about C++, and have been given a series of programs to do. I have completed the 4/5, and they work well. The following is the … | |
Hello, i am currently a First year university student, and i am taking an advanced C and C++ programming course, but i am having difficulties.. i do not know how to study for it, i did miserably on my first midterm, and i need to pass this course, does anyone … | |
Hi guys..I am trying to make a program that can calculate the time difference in days from the current date..here is my code...it is bringing some bit of a problem...please help me out!Thanks [code] #include <iostream.h> #include <cdate.h> class Date { public: int month; int day; int year; static int … | |
Hi, I am using Fedora Core 5 32+bit as my os but not using a particular development tool as of now and just sticking to the normal text editor called the KWrite. I am learning C++ and MySQL on my own and want to know if the connection between the … | |
Hi, I have to write a program that can connect family members. The program should be able to input a name and find the parents and/or granparents of that person. I was wondering how to do this and i have no idea where to start. I am a beginning student … | |
I have implemented inheritance and in the print function for class playertype I have called the print function from personType. When I call the playerType fucntion print() with a playerType object only the playerType variables are printed and not the personType variable firstName and lastName. [code] #ifndef H_personType #define H_personType … |
The End.