49,761 Topics

Member Avatar for
Member Avatar for cokaznsyco72

I'm having trouble with this program from right out of the book. Its just supposed to write an integer array to a file that it creates. I've compiled it without any errors, but when I try to run it, it fails and tries to debug. can anyone help me figure …

Member Avatar for WouterLindenhof
0
146
Member Avatar for gretty

Hello I have made a function that determines whether 2 words are an anagram or not. [B]My Problem is:[/B] that if the word contains 2 or more of the same letters(eg hello, arrest, gall) the function doesn't work even when the 2 words input are an anagram, If i input …

Member Avatar for mrnutty
0
517
Member Avatar for esesili

Hi everyone, I have a problem about inheritance and I can not solve it since Monday. I have two classes [B](Student_Patient and Emp_Patient) [/B]inherited from [B]Patient[/B] class. [B]Patient [/B]class and [B]Doctor [/B]classes are inherited from [B]Person [/B]class. The [B]Doctor[/B] class has a member function[B]double get_fee_of_doc() const;[/B] which returns a double …

Member Avatar for NathanOliver
0
117
Member Avatar for adel_elrefaey

#include <time.h> // double RAND_MAX = 4294967296.0; //2147483647; // void aleatorio(); void warmup_random(double); void advance_random(); int flip(double); double randomperc(); double aleatorios_0_1(); long rnd(long, long); double Rseed; /* Random numbers seed */ double oldrand[55]; /* Array of 55 random numbers */ int jrand; /* current random number */ /* Initialize random …

Member Avatar for adel_elrefaey
0
720
Member Avatar for Cole

Hi everyone! I am starting my first year of college classes next week with an intended entry into a computer science major. I am most proficient in Java and PHP, and understand that C++ and the former are vastly different. In doing some research, I have found that my professor …

Member Avatar for northrider
0
153
Member Avatar for hollywoood

Hello everyone.... I have gotten this far with my mortgage calculator....the problem is the while loop and the actual calculation isn't working correctly. The while loop really doesnt do what i was hoping for it to do...and being pretty amature at this...i am not sure where to go. i built …

Member Avatar for hollywoood
0
772
Member Avatar for Roguey

I'm trying to write a peice of code that will convert all the uppercase characters in a word to lowercase, and to store that in an array. I know how to convert individual characters, and to output all these characters in the fixed lower case. The thing i'm unsure about …

Member Avatar for mrnutty
0
446
Member Avatar for CD-4+

hello , i am a newbie in c++ and desperately wanna learn it. icoded this but i m gettin some error [code]# include<iostream> using namespace std; class cat { public: unsigned short int age; public: void meow () { cout<<"MY AGE IS "<<age<<endl; } [/code] [code]# include"cat.cpp" int main() { …

Member Avatar for dgr231
0
156
Member Avatar for eaon21

[CODE] #include <iostream> #include <algorithm> #include <conio.h> #include <cmath> #include <iomanip> using namespace std; int main() { int terminals[]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20}; int count,row,col,i; int limitcomp[20]; int coordinates[2][20]; double smallest = 0.0; double current = 0.0; double x, y; int network = 1; double chunk, total; do { cout<<"Enter number of computers: "; …

Member Avatar for VernonDozier
0
147
Member Avatar for esesili

Hi all, I have a simple question. I am working on it for a long time and I feel that I am almost done except for a small problem. As seen below there is a member function of patient class. It takes variables name and visit_duration. In addition to these …

Member Avatar for Sky Diploma
0
144
Member Avatar for littlegal

I am writing in C and using using VC++ 2008, .net 3.5 sp1 framework using a USB - to serial converter for serial port -- it comes up as COM4 on Windows 7 x64 as the operating system. Need to read and write to a circuit board which gives out …

Member Avatar for VIeditorlover
0
148
Member Avatar for Schoorsteen

Hello, I am having a trouble with the proxy I am making with C++. I am connecting a client to a server trough my program. client talks to my program, program talks to server server talks to my program, program talks to client Like that. However, when I receive something …

Member Avatar for Schoorsteen
0
393
Member Avatar for maxbug

I have an MFC SDI application in VC++6. Data is read from disk in the Doc, converted, and displayed in the View. I have implemented a CDialog, launched from an entry on the main menu, in order to permit the setting of data display options. By including the CDialog's header …

Member Avatar for maxbug
0
103
Member Avatar for Traicey

Hi all I have a function writetofile() which save a record to a file but the problem is when its writting to a file it doesnt write the record in a correct order, here is the code for WriteToFile() [code=c++] void StudentC::WriteToFile() { ofstream Outfile; Outfile.open("File\\Student.txt", ios::app); Outfile << Count …

Member Avatar for group256
0
225
Member Avatar for chikool

error C2106: '=' : left operand must be l-value for (int m=0;i<4 && i%2==0; m*m =i) { cout<<"Multiplication of all positive even numbers which are greater than N: "<<i<<endl; }

Member Avatar for dgr231
0
110
Member Avatar for jen140

Hello all. I get a small problem compiling it. And get the next error: \client/windows/handler/exception_handler.h(72) : fatal error C1083: Cannot open include file: 'client/windows/crash_generation/crash_generation_client.h': No such file or directory So how i proceeded : Installed mozilla-build 1.4, reinstalled the windows sdk(to the latest version), and have Visual Studio 2008 Professional …

Member Avatar for jen140
0
147
Member Avatar for franksmule

Hi, I am having a problem trying to get a callback function to work within a class. Its from the DXUT Direct X source code example. I'm basicly trying to get a callback to call a function within a class. I'm stuck, been reading around looking at all these pointers …

Member Avatar for Tom Gunn
0
130
Member Avatar for dzhugashvili

I have this code: [CODE] #include <iostream> #include <string> #include <vector> #include <algorithm> #include <fstream> #include <stdlib.h>//(for atoi to work) using namespace std; void usage() { cout << "Usage: <input1> <input2> <output>\n"; cout << "\n see README for more details.\n"; exit(1); } int main(int argc, char *argv[]) { cout << …

Member Avatar for dzhugashvili
0
142
Member Avatar for nalasimbha

In my project there is a need to for multiple inheritances and I have figured out that i need to inherit base classes virtually. The code that I have works fine, but I would like to know in particular what happens internally during inheritance. The classes that i use and …

Member Avatar for nalasimbha
0
87
Member Avatar for eliza2044

Hey guys, I've been working with KML files for displaying placemarks on Google Earth. Through my C++ application I need to insert new placemarks in a generated file. Some example code follows and may give you an indication on what kml is and what i want to do. As the …

Member Avatar for eliza2044
0
169
Member Avatar for Jason123

Hi, i would like to know if list is able to achieve these : 1) to get the range of elements such as .. A list of 10 elements beginning from value 1 to 10. I would like to get the range from element 3 to element 5 and add …

Member Avatar for Tom Gunn
0
96
Member Avatar for tatainti55

Hey guys. I was just following lazyfoos' SDL tutorial when i got stuck on lesson 08. Everytime i try to compile and run the source code the program closes immediately and a window pops up that says "An access violation(segmentation fault) raised in your program.". :S The compile log: Compiler: …

Member Avatar for daviddoria
0
193
Member Avatar for esesili

When I compile the code below it generates more than 30 syntax errors. It does not make sense. The problem is probably somewhere in [CODE]Patient(string name_of_patient, int age_of_patient, string address_of_pat, double visit_duration_ofp, string ssn_of_patient, Doctor &doc);[/CODE] but I could not figure out the problem. I know it is not convenient …

Member Avatar for StuXYZ
0
127
Member Avatar for charis89

Its my 1st time posting here... Do tell me if I am doing anything wrong. [code=c] cout << "Please specify a question that has a yes answer for your object and a no answer for my guess:" << endl; getline(cin, qtn); foundyq = qtn.find_first_not_of("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ "); while(int(foundyq) != -1) { if(noTry …

Member Avatar for Salem
1
162
Member Avatar for Democles

Basically the idea is to center a string. I selected the total length to equal 80. I know there is no fail safe placed into this program. I know there is another way to do this. I am stuck in a way. The program works, but I think I am …

Member Avatar for TimeFractal
0
13K
Member Avatar for Vermillion

I'm trying to make a simple program to improve my use of pointers (because I suck very badly at that), and I was doing fine, until I found this problem: -- HEAP CORRUPTION DETECTED: after Normal block (#155) at 0x007D18F0. CRT found that the application wrote to memory after end …

Member Avatar for mrnutty
0
1K
Member Avatar for eaon21

our task is to determine how the computers should be connected into such a chain to minimize the total amount of cable needed. there are 20 terminals each has a corresponding coordinate(x,y). the user will just choose which terminal he will put his pc's. 1. you wil ask the user …

Member Avatar for eaon21
0
146
Member Avatar for esesili

Hi all, I have two classes [B]C[/B] and [B]D[/B] these classes are inherited from [B]B[/B] class. My question is how can I use a member function of [B]C[/B] at[B] D[/B] and at [B]D[/B]'s child classes? I tried to do it with a regular function but it does not work in …

Member Avatar for esesili
0
139
Member Avatar for ryno365

Hello. I'm a new c++ user after having used Java for a few years as well as php. I'm having trouble with strings and how they can be used with classes. This is what my runner.h file looks like [CODE]#include <string> #include "TestApp1.h" #ifndef RUNNER_H using namespace std; class Runner{ …

Member Avatar for ryno365
0
111
Member Avatar for zahidaiub

Hi, I want to retrieve the hardware information (CPU info, RAM size, HDD info, VGA info) for dos platform. Anybody can help me with Turbo C or C++ source Code? Any help will be greatly appreciated. Thanks

Member Avatar for Salem
0
195

The End.