51,593 Topics
![]() | |
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 … | |
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++ … | |
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 … | |
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 … | |
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 … | |
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 … | |
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() = … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
![]() | 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 … ![]() |
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 … | |
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 … | |
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? … | |
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 … | |
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 … | |
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 … | |
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] … | |
[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; … | |
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) { // … | |
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. … | |
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 … | |
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 … | |
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 … | |
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? | |
hi ... An error: There is missing ; before * .. What does that mean .. Plz help me the project on the attachment | |
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 … | |
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 ? | |
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 … | |
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] | |
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 … | |
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 … | |
hi can anyone pls suggest me website through which i can safely download a c++ software? | |
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 | |
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 | |
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" … | |
[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 … | |
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 … | |
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 … | |
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 … | |
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" … | |
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 | |
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 … | |
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 … | |
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 … |
The End.