49,761 Topics

Member Avatar for
Member Avatar for Rikard

Hallo! I've been having some trouble getting a save/load function to work properly. I'm trying to save object and their properties to a file in binary using fstream. And then being able to load the object from the binary file the next time im running my project. Quick breakdown: I …

Member Avatar for Rikard
0
204
Member Avatar for rcplguy15

hello, I wanted to ask you all a question. suppose that my c++ program has read from a text file a set of characters like the one below using the command inData >> temp. i output the characters of the text file and stored all the characters in a string …

Member Avatar for rcplguy15
0
329
Member Avatar for medopunsher

Hey all , I'm writing a Windows program & i'm having a very silly and annoying problem. I Create a very simple Dialog(It's a window actually) with one text box and one button , then i try to use SetFocus() function to Give the focus to the text box so …

0
49
Member Avatar for sniper6560

this code is for bessel function Y n (x) 2nd kind I'm in the level 4 at computer engineering my prof. gave me that assignment , I want help to improve it to get an accurate results thanks!

Member Avatar for sniper6560
0
1K
Member Avatar for dmh22

OK, here is my dilemma, I am trying to read an input file into 3 arrays. The file must be formatted as such (ie - with each value on a new row): 3 - n value for an n x n matrix 'a' 1 - a11 - Next n^2 terms …

Member Avatar for dmh22
0
127
Member Avatar for rajeshmithy

tell me code for designing a simple text editor using C++ with open,save,save as,like other options..

Member Avatar for prvnkmr449
0
66
Member Avatar for The physicist

Hi all, bit of a c++ newbie and hoping you might be able to help me with a problem. I'm trying to calculate the elapsed time between two dates using difftime, however I keep getting an elapsed time of 0. Can anyone see where I'm going wrong? Any help greatfully …

Member Avatar for The physicist
0
831
Member Avatar for kazkikay12

why i cant run graphics.h in turbo c++ but i have graphics in my llibrary :( help plss

Member Avatar for daviddoria
0
81
Member Avatar for COKEDUDE
Member Avatar for Colezy
0
108
Member Avatar for jmcorpse

Hello, I have been working on this program for the past four hours and was doing good till I got to this point. I am pretty sure that I probably can't do it this way, but I'm just learning and it isn't becoming apparent to me how to correct it. …

Member Avatar for jmcorpse
0
150
Member Avatar for gju
Member Avatar for frogboy77

when i try to use pow with cmath header i get error message pow(int,int)is ambiguous it also gives other possible options i.e pow(double,int) why is int^int ambiguous? how could it be less ambiguous?

Member Avatar for Fbody
0
140
Member Avatar for ASTA LAVISTA

hi every body>>>> please i am student and this my homework very important to me the question is : how to complete this simple program to make its return 0 ????? the answer is some thing instead of: [CODE] /* some statments */ [/CODE] please i am new here and …

Member Avatar for ASTA LAVISTA
0
405
Member Avatar for fire_

I need your help... Again... How can i combine reading from file with [iCODE]std::getline(file, std::string);[/iCODE] and [iCODE]UpdateData(FALSE);[/iCODE] ? UpdateData() accepts only CString and getline only std::string, and then i try to use it like that: [CODE]std::string readbuff; int length; std::ifstream file("file.txt"); while(getline(file, str)) { length = str.length(); for(int i=0; i<length; …

Member Avatar for fire_
0
627
Member Avatar for frogboy77

hi, beginner question i am planning to write code for different values of a^b. both a and b will vary in the program and both will be long long ints; as my compiler wont allow pow(int,int) as it is ambiguous(dont know why) either while have a as a double and …

Member Avatar for frogboy77
0
87
Member Avatar for frogboy77

trying to write a fuction to work out the GCD of two numbers seems to run ok but the return is incorrect any help much appreciated #include <iostream> #include <cmath> using namespace std; int g_c_d(int a,int b); int main() { cout<<g_c_d(2871,4060);/*test example*/ cout<<endl; system("pause");/*been advised not to use this but …

Member Avatar for frogboy77
0
122
Member Avatar for kashifboy

[code] how can we check that user [B]inter [/B]an [B]integer[/B] or not? [/code]

Member Avatar for Narue
0
97
Member Avatar for Bri426

I'm new to C++ and I'm having trouble understanding how to determine what to put inside a loop. I know it differs from program to program, but a lot of my assignments deal with the user inputting a number of how many numbers they want to input (it can be …

Member Avatar for frogboy77
0
222
Member Avatar for burcin erek

there is a mistake on the code. I would like to write "test" like t e s t but it writes reverse. it is easy but my brain is not enough. [CODE]#include <iostream.h> #include <string.h> #include <conio.h> int main(void) { char *pointer="test"; int index; for(index=(strlen(pointer)-1); index >= 0; index--) /* …

Member Avatar for burcin erek
0
88
Member Avatar for glenak

Hi, Java has been my choice programming language for many, many years now, and I want to start doing C++. I've written in C++ before, but that was a while back. I'm treating myself as a beginner at the moment. I use Eclipse to write Java, and I recently updated …

Member Avatar for glenak
0
229
Member Avatar for localp

There's a header class called example.h [CODE] #ifndef __Sample_H__ #define __Sample_H__ namespace example { namespace Samples { class AlgorithmSample { public: virtual void release(void) { delete this; } virtual boolean process(void); }; class AlgorithmDesc { public: virtual String getName(void) const { return "some example program"; } }; }; }; #endif …

Member Avatar for Valaraukar
0
135
Member Avatar for kra9853

// The purpose of this Lab is to start the program used in Lab 1 and modify it // to calculate the average of 4 grades entered by the user and display the results // on the console through the use of the math operators in C++. // Part 2 …

Member Avatar for Valaraukar
0
172
Member Avatar for xan-ti

When under Windows 2008 Server with my C++-program (with a cicle) many directory are copiing, then the memory is increasing and remain at a high level. Waht can I do?

0
91
Member Avatar for waphon
Member Avatar for alcx88

I'm trying to sum command-line integers. My total is constantly 473. I dont know how to get the right total. [CODE]#include <stdio.h> 4 #include <stdlib.h> 5 #include <ctype.h> 6 7 #define MAX 100 8 9 void sum(char *a, int n); 10 11 main (int argc, char *argv[]) 12 { 13 …

Member Avatar for chiwawa10
0
104
Member Avatar for LevyDee

So i guess its easy enough to encrypt text, but what if you wanted to encrypt a video file or some other file that wasn't text? By writing my own program I mean. How does that work, any links? Thanks

Member Avatar for LevyDee
0
81
Member Avatar for dasari.prasad

When to use pointers and when to use references in c++. plz clear my doubt.. thnks in advance

Member Avatar for ben1Greer
0
427
Member Avatar for D4n1sD

I need some help, I have created a text box and a button, how do I handle the data, like... what do I have to put inside the button case and what to output the data? I have tried so far... [CODE]case ID_BUTTON: { // code const int size = …

Member Avatar for Ancient Dragon
0
72
Member Avatar for YingKang

I just learned class and object today, couldn't even get the code compiled. could anyone help please? Thank you I have three files: Product.h Product.cpp TestProduct.cpp We haven't learned to put everything in a project yet. so for now, just just these three source files. [CODE] class Product { private: …

Member Avatar for mike_2000_17
0
746
Member Avatar for NewLegend

Hello I used 2 linked list. First : Students. Second: Doctor. Every Doctor takes a set of his students. The problem : How do I add students to the doctor? [CODE]#include <iostream> using namespace std; #include <string> struct student { string name; // current name student *next; // pointer to …

Member Avatar for mike_2000_17
0
90

The End.