49,761 Topics

Member Avatar for
Member Avatar for chubbywubba

[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); // …

Member Avatar for WaltP
0
83
Member Avatar for degamer106

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 …

Member Avatar for degamer106
0
118
Member Avatar for terp410

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 …

Member Avatar for terp410
0
1K
Member Avatar for arfmal

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? …

Member Avatar for Lerner
0
156
Member Avatar for Matt Tacular

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 …

Member Avatar for Matt Tacular
0
277
Member Avatar for ikix

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() …

Member Avatar for John A
0
127
Member Avatar for hellokitkat

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 …

Member Avatar for John A
0
483
Member Avatar for trunks1212

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

Member Avatar for trunks1212
0
151
Member Avatar for kansmish82

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 …

Member Avatar for WaltP
0
148
Member Avatar for Joe689

[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

Member Avatar for Salem
0
254
Member Avatar for moeski301

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 …

Member Avatar for moeski301
0
162
Member Avatar for olams

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 …

Member Avatar for olams
0
143
Member Avatar for jobra

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 …

Member Avatar for WolfPack
0
43
Member Avatar for bosanac515

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 …

Member Avatar for John A
0
940
Member Avatar for Laughs Galore

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 …

Member Avatar for John A
0
148
Member Avatar for DummyChuck

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 …

Member Avatar for John A
0
122
Member Avatar for bops

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 …

Member Avatar for Narue
0
178
Member Avatar for samernic
Member Avatar for Narue
0
106
Member Avatar for hellokitkat

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 …

Member Avatar for Salem
0
148
Member Avatar for soultron

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 …

Member Avatar for jwenting
0
145
Member Avatar for varsha_saxena

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 …

Member Avatar for varsha_saxena
0
110
Member Avatar for JaksLax

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, …

Member Avatar for JaksLax
0
235
Member Avatar for abhijit11

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 …

Member Avatar for Colin Mac
0
191
Member Avatar for bigben09

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 …

Member Avatar for WaltP
0
114
Member Avatar for Schooley

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 …

Member Avatar for Schooley
0
90
Member Avatar for Shaabangbang

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 …

Member Avatar for Shaabangbang
0
114
Member Avatar for hui

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 …

Member Avatar for Ancient Dragon
0
199
Member Avatar for tech291083

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 …

Member Avatar for Ancient Dragon
0
84
Member Avatar for bbycapr

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 …

Member Avatar for Ancient Dragon
0
85
Member Avatar for SHWOO

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 …

Member Avatar for John A
0
126

The End.