51,593 Topics

Member Avatar for
Member Avatar for rickster11

Each time the program goes through a loop, nameField gets bigger and bigger. Strcat keeps adding new names to the field. How can I clear the field after each output? I thought it was something like nameField = {' '};...but that doesn't work. There has to be a simply way …

Member Avatar for rickster11
0
144
Member Avatar for monocog

I'll start any posts I make the same way, just so people know that I'm NOT trying to get homework done... Before I begin, let me start by saying that this is NOT homework. I am also not enrolled in a C++ class. I am simply trying to learn C++ …

Member Avatar for nucleon
0
168
Member Avatar for shasha821110

Hi, all Like i asked before, This thread is about Memory Leak. I am a beginner in c++ and want to become a senior programmer. When i was coding, i found the memory leak is happening everywhere and maybe some senior programmer also have this problem. So i want to …

Member Avatar for William Hemsworth
0
111
Member Avatar for Barefootsanders

I'm writing a simple networking application. I'm using berkley sockets and was wondering if there was a way to enable the UDP w/ ACK option when setting up a udp socket. I know the UDP protocol has an field (in the options area) to enable it but I'm unsure on …

0
91
Member Avatar for cymerman

I am doing an assignment that has to use a class dayType. The program has to set the day, print the day and return the next day. I am receiving the error: --------------------Configuration: Program9 - Win32 Debug-------------------- Compiling... Program9.cpp C:\Documents and Settings\Faculdade\ISM3232\Assig9\Program9\Program9.cpp(45) : error C2447: missing function header (old-style formal …

Member Avatar for miami99
0
541
Member Avatar for shasha821110

Hi, all i am reading some memory leaking problem articles now. Here is one question i can't understand: [code=c++] char *a= new char[10]; char *b= new char[10]; b=a;//pointer assignment delete []b; [/code] In this article, it mentioned that the pointer assignment have side-effect and we couldn't delete pointer b from …

Member Avatar for verruckt24
0
146
Member Avatar for c_shaft05

I'm having frustrations with C++... when I try and compile my code (as simplistic as it is), I keep getting a 'Shape' not declared error, but I'm fairly certain that I've written it correctly. shape.h [CODE]#ifdef shape_h #define shape_h using namespace std; class Shape { public: Shape(); virtual ~Shape() = …

Member Avatar for c_shaft05
0
150
Member Avatar for pete08

I have started with simple c# mail application, to send message from one computer to the other, which are connected by LAN. My question is: how to define addresses, or mailmessage.from and mailmessage.to. I have tried with their addresses, but nothing... Pete

Member Avatar for pete08
0
158
Member Avatar for Georges5

Hi all, I have written a C++ code that reads data (as double) from a huge binary file with size 2.5 GB, then process the data and write it to another binary file. What is really strange, the code works fine and smooth in Borland C Builder 6, but since …

Member Avatar for Georges5
0
250
Member Avatar for Ziwx

Hello all smart people! My problem is that the code below somehow should be able to summarize the [I]double betalat_andras[/I] and the [I]double skyldig [/I](not with each other) for each specific person. That is if a Person Bob is added with [I]betalat_andras = 1 [/I]and [I]skyldig = 2[/I] and then …

Member Avatar for Ziwx
0
116
Member Avatar for jrw0267

I have a project and am hung up at the moment. I am supposed to read from a file containing all of the function calls that I need to make. For example: Insert(33) would call the Insert function with an int paramater 33. How can I read this in from …

Member Avatar for idb_study
0
75
Member Avatar for sonicstage

Hi I'm a new user of c++ and our professor gave us a homework problem where we have to find the standrad deviation, the min, the max and the avg of an array of numbers, here is what I have so far but now I'm really stuck trying to make …

Member Avatar for verruckt24
0
101
Member Avatar for kiddo.me

What memory model does Dev-Cpp follow...? And how can I change it to have a segment more than 64 KB of memory....? I need it as my program stops executing in between and throws an exception - "Process returned -1073741819c(0xC00000005)" Same thing happens in Code Blocks.... So i need to …

Member Avatar for kiddo.me
0
128
Member Avatar for pri_skit

How to detect USB Drive & its letter by reading register key values in EVC++ 4.0? The location of register of local mount point is: The HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices Thanks

Member Avatar for MosaicFuneral
0
67
Member Avatar for pedza95

I know that it is possible to output and get input from the console without using iostream and it's cout and cin using the Windows API. I don't know how to do this because I'm new to c++ but I know it has something to do with kernel32. Can anyone …

Member Avatar for MosaicFuneral
0
1K
Member Avatar for aiurovet

I am trying to mimic the behavior of Language Indicator pop-up menus (which pop-up when you do left or right mouse click on the Language Indicator), so the foreground window and focus do not change, and it is still possible to use keyboard to select or cancel menu (arrow keys …

Member Avatar for aiurovet
0
143
Member Avatar for infernojmd

ok so my compiler is doing something weird, for this like of code it is thinking the \d is a command like \n but that is a cstring, and it uses each char to decode a message to Attack at dawn!, but comes out missing the c, any hits or …

Member Avatar for stephen84s
0
116
Member Avatar for danielle23

I have been working on this assignment for a while. I have read a couple other threads in this site regarding similar solutions but I feel mine might be a little more unique. This tic-tac-toe board is user entered, simply setup as 9 characters in 3x3 format. Input should look …

Member Avatar for VernonDozier
0
1K
Member Avatar for pri_skit

1.I'm trying to write an MFC program in EVC++ 4.0 on window CE 5.0 that lists the disk drives on the system (C:, D:, and so on). I also need to know if the drive is a hard disk or a USB. Is there a class to get this information? …

Member Avatar for pri_skit
0
75
Member Avatar for the b

Hi, I would have replied in the last thread instead of creating a new one again but I have a dial up connection and dad doesn't like me tying up the phone lines at this time in the year. In the last thread I asked how to find the cubed …

Member Avatar for DEMWilson
0
184
Member Avatar for ryan858

I'm sorry if this is the wrong place to ask, but I figure since it's a [I]C++[/I] IDE it's probably qualified... How do I compile my program without all the extra debugging stuff in Dev-C++? I looked through it but I can't find any way to do this... I know …

Member Avatar for nucleon
0
106
Member Avatar for sciwizeh

I have the eclipse for Java developers, and I have the MinGW that's distributed with Dev-C++. I just want to know what downloads need to get from the update manager of eclipse, I also don't know how i set it up to use the compiler that came with Dev-C++. I …

0
82
Member Avatar for ganbree

I'm trying to read a Unicode file using std::wifstream. On wintel. [code=c++] #include <iostream> #include <fstream> #include <string> using namespace std; int main() { wifstream File("input.txt"); wstring Line; while(!File.eof() ) { getline(File, Line); wcout << Line << endl; } system("pause"); return 0; } [/code] And this is my output [code] …

Member Avatar for seanhunt
0
586
Member Avatar for M3rcury

[code] #include <iostream> using namespace std; void round(); int main() { void round(); { double input; double output; double first; double second; double third; double decimal_fix; cout << "Please enter the Number and the Places to round off" << endl; cin >> input; cout << "DEcimal places to fix" <<endl; …

Member Avatar for Ancient Dragon
1
110
Member Avatar for viki0077

Let Wallet be a class that represents the amount of coins and bills in a purse. The class has got a data element amount of type long. The binary operator += shall be overloaded as an inline method. Identify the error in the following definition. Wallet& operator+=(Wallet& w) { // …

Member Avatar for ArkM
0
87
Member Avatar for trevorp

Hello all. I need some help on some code... function definition double Magnitude () const; function implementation double Vector::Magnitude () const {return sqrt(X*X + Y*Y + Z*Z);} Test cout<<"test 4 \n"; cout<<"VectorA ^ VectorB = " (VectorA^VectorB)<<" = "<<(VectorA^VectorB).Magnitude()<<endl; I get c2064 on the portion of code highlighted in red. …

Member Avatar for nucleon
0
194
Member Avatar for shindu

Hi, im working on a small console app that among other things calculates the mean value of all rows and columns of a matrix. I want to incorporate the mean symbol (x with an over score) into the out put but the symbol isn't included in the ASCII chart, any …

Member Avatar for shindu
0
108
Member Avatar for koliva

Hello everyone, I have a ray-tracing code and I can successfully generate images taken from different view points. My generated image has 802x802 resolution. I am applying the same procedures for every different point of view. However, my generated .bmp files always have different file size. I wonder why? They …

Member Avatar for Salem
0
95
Member Avatar for bussaina

How do this Print the decimal, octal and hexadecimal values of all characters between the start and stop characters entered by a user. For example, if the user enters an a and z, the program should print all the characters between a and z and their respective numerical values. Make …

Member Avatar for Ancient Dragon
0
307
Member Avatar for viki0077

Let class Customer { private: long id; string name; public: ... }; be part of a class definition. What is wrong with the following constructors ? Customer () { id(0); name(''X''); } Customer () ( long n, const string& s) : id(s), name(n) { } Does anyone know this?

Member Avatar for viki0077
0
122
Member Avatar for hatemstar

hi ... An error: There is missing ; before * .. What does that mean .. Plz help me the project on the attachment

Member Avatar for Comatose
0
109
Member Avatar for blerina12

Hi guys. I was wondering if you could help me with this code. I am trying to open a file and read character by character. The program compiles but when I run it it aborts with an access violation while reading from the file. I made the program output the …

Member Avatar for blerina12
0
98
Member Avatar for viki0077

Does anyone now answer to this: Suppose class X includes a data elements common declared as public. How can it be accessed by all functions in the same name space ?

Member Avatar for kbshibukumar
0
161
Member Avatar for Omega037

I have been having a serious problem relating to memory allocation and arrays/vectors in C++ using the G++ compilier on both a windows machine(Dev-C++) and linux(debian). I would post all the code, but it is proprietary technology(I'm a Graduate Student) and therefore I can't share it openly without permission. That …

Member Avatar for StuXYZ
0
192
Member Avatar for viki0077

Please can anyone tell me in few words What is wrong with the following class definition? whait's missing, etc. [code] Class Numeric { private: long x; public ... void set (long n) const { x = n; } long get () { return x; } const } [/code]

Member Avatar for winrawr
0
279
Member Avatar for Manutebecker

For instance... I have the class Deck, which represents a deck of cards, and I want another class, derived from that, called cards, I want class Deck to have a class array called Cards[52], so I can assign all the different values and strings to the individual Cards class instances …

Member Avatar for DemonGal711
0
127
Member Avatar for deepalici0us

I am using Microsoft Visual C++ to write a program, i am trying to As records secretary for Cougar High School, you have been asked by the principal to prepare a report on the grades of some of the school's top athletes. Specifically, you must print each of the athlete's …

Member Avatar for vmanes
0
267
Member Avatar for rohit joshi

hi can anyone pls suggest me website through which i can safely download a c++ software?

Member Avatar for jbennet
0
160
Member Avatar for waferstix

hello there! i badly need help on this. how do i implement a power function that: a. does not use the cmath library b. does not use repetitive multiplication c. USES repetitive Addition thanks in advance! :S

Member Avatar for daviddoria
0
40
Member Avatar for ScienceNerd

Could someone help me with this? This is the warning message [url]http://s5.tinypic.com/28ilonq.jpg[/url] Variables [url]http://s5.tinypic.com/n1a5fk.jpg[/url] I know it should be an integer for the total_gal_paint, but it keeps giving me that message

Member Avatar for daviddoria
0
122
Member Avatar for WesFox13

Hello there, I made this code for an ISBN verifier but there's a problem with it [CODE=C++] #include <iostream> #include <fstream> // REQUIRED FOR FILE STREAMS #include <cstdlib> // FOR DEFINITION OF EXIT_FAILURE #include <cctype> #include <string> using namespace std; // ASSOCIATE STREAMS WITH EXTERNAL FILE NAMES #define inFile "isbntest.txt" …

Member Avatar for daviddoria
0
87
Member Avatar for nishidh

[CODE] # Makefile for Nikunj C. Oza's code. # # Definitions of basic variables. CC = g++ LIB = -lm # CPPFLAGS = -O2 CPPFLAGS = -g # File set (only one right now) OBJ1 = bagdtstump.o bagging.o baggingnb.o bagnn.o boostdtstump.o boostdtstumpave.o boostdtstumpave2.o boostdtstumpave3.o boosting.o boostingac.o boostingave.o boostingave2.o boostingave3.o boostdttotal.o …

Member Avatar for daviddoria
0
164
Member Avatar for number87

So, what Im trying to do here is a client server socket program. The client will ask a question to the server. For example, How are you? Then the server opens a text file, compares the string from the client and outputs the answer to the client. My text file …

Member Avatar for number87
0
156
Member Avatar for southernd0529

I have written the program but I do not know if the results are correct. This is my Declaration: length width area and perimeter. My Input is length and width. The calculations are p=2*(l+w) and a=l*w. My Output is P and A. So what i want to know is, are …

Member Avatar for rudasi
-1
192
Member Avatar for cproud21

I have the following array that prints out the amount of rainfall for each month, and then uses a bubble sort to sort it in ascending order... How can I display the name of the month along with the value that is already displayed? [ICODE]#include <iostream> using namespace std; void …

Member Avatar for rudasi
0
120
Member Avatar for rekhamanoj

kindly help me to resolve this error. I have a function inside a namespace in my header file . This is my header file #ifndef _MATPACK_H_ #define _MATPACK_H_ //-----------------------------------------------------------------------------// #include "scene.h" // class Scene #include "mpmatrix3d.h" // 3d matrix template classes #include "vector.h" // vector and matrix classes #include "mpspecfun.h" …

Member Avatar for daviddoria
0
129
Member Avatar for shanexuan

can anybody help me?currently i had wrote a coding for trash recycle system.to make thing more interesting,I wish to add simulation in that coding,however,I failed to do it,since my visual C++ is just still basic only.Hope U all can lend me a hand,please.thanks

Member Avatar for StuXYZ
0
106
Member Avatar for hurbano

I was given this .h file to implement with a cpp file. the directions say to add the definitions of the functions to overload the operators +=, which implements the same operation as the unionSet(monthsSet &B) function; -=, which implements the same operation as the differenceSet(monthsSet &B) function; ==, which …

Member Avatar for VernonDozier
0
441
Member Avatar for shasha821110

Hi, all i have big assignment and don't have any compiler problem just have runtime bug--this make more headache. Here is the driver; [code=cplusplus] int main{ int * values2 = new int [ARRAY_SIZE * 2]; values2[ARRAY_SIZE * 2 - 2] = 8; values2[ARRAY_SIZE * 2 - 1] = 5; stack.pop …

Member Avatar for shasha821110
0
105
Member Avatar for raymyster

i need to make a program that will identify the values of ABCDE that will result to EDCBA if you will multiply it with 4. looks like this: ABCDE x 4 = EDCBA i already have the values, it's 21978 x 4 = 87912 but i dont know how to …

Member Avatar for vmanes
0
121

The End.