49,757 Topics

Member Avatar for
Member Avatar for CPPRULZ

Hi I have to do an assignment for a course that includes that I use new stream insertion and stream extraction techniques. On the lecture notes it briefly mentioned cin.get() and getline but not in a very descriptive way. Could anyone please summarize the use of get() when inputting more …

Member Avatar for mrnutty
0
111
Member Avatar for serkan sendur

i have a problem instantiating an object, to demostrate that problem i created three files named body.cpp, head.h, head2.h the content of the files are as follows: body.cpp: [CODE]#include "head.h" class2::class2() { myClass(5); } int main() { class2 myFinalClass(); return 0; }[/CODE] head.h: [CODE]#include "head2.h" class class2 { public: class1 …

Member Avatar for Narue
1
114
Member Avatar for Medix

How can we Justify this thing that Dynamic memory allocation is more flexible and efficient than static memory allocation but slower than static?Pls explain

Member Avatar for Medix
0
86
Member Avatar for timos

Hello, this is my file format: MP,EX,1,1.081048e+10 MP,ALPX,1,9.600000e-06, 3, 2.3 MP,NUXY,1,3.000000e-01 CX,DENS,1,2.797598e-01 BT,KXX,1,6.752689e+02 MP,C,1,3.448000e+05 I want to extract first sring, then second, then I want to extract all numbers in to a float till I come newline, there could be up to 10 values. How do I extract if my …

Member Avatar for vmanes
0
85
Member Avatar for gsingh2011

Hi, what are the advantages of C++ over C#? I have a little bit of knowledge in both of them, but I am going to choose which one to dedicate most of my time to.

Member Avatar for d0pedup
0
238
Member Avatar for d0pedup

Firstly, this is my first "project" involving code written by others, on top of which no experience dealing with any framework. Given this information, how do i understand a framework. Also, Very little documentation is available ATM. I tried to use a top down approach i end up accomplishing very …

Member Avatar for d0pedup
0
84
Member Avatar for jake88

I've parsed an XML and now I'm trying to write into some elements that are text nodes. What is the best way to go about writing into these text nodes? Ex. <tag>insert texty text here </tag>

0
60
Member Avatar for seebharath

How do i read an xml file with unmanaged c++?? is there any built in classes with VS 6.0 i.e with unmanaged code.. Please help..

Member Avatar for jake88
0
113
Member Avatar for yuanza

I have this program that will ask user to put in the day, it compiles but every time i set the day to Saturday this program won't display Saturday, instead it shows Sunday. It also won't correctly generate the output for yesterday if the current day is Sunday and tomorrow …

Member Avatar for yuanza
0
125
Member Avatar for Lukezzz

I have a general question. I have a Form where I have some buttoncontrols and 3 textBoxes. What I do now is to add a "TabControl" and a panel1 on the Form and then I put all the other controls inside this panel on the "TabControl". When I now compile …

Member Avatar for vnevyhosteny
0
189
Member Avatar for Stefano Mtangoo

Hello all, I'm starting C++ and wan't to learn for loop. I want the Loop to count down the rotate and print its value until when it equals to value where it terminates. Here is code [CODE=C++] int value; int rotate = 4; for (value = 0; rotate>value; rotate--; ){ …

Member Avatar for Stefano Mtangoo
0
86
Member Avatar for thelamb

Hello all, I am coding a client/server in C++ - everything is working so far but I was wondering if my approach is correct or if there is a better way of handling this: In this version only 64 clients need to be able to connect, in a different application …

Member Avatar for thelamb
0
178
Member Avatar for smithss

Hi Guys... I have some basic doubts with references and pointers and need some understanding on the behavior of this code [code=c++] #include <iostream> using namespace std; class a { public: int getAmount(a&); private: int amount; }; int a::getAmount(a& p) { cout << this << endl; cout << p << …

Member Avatar for smithss
0
86
Member Avatar for TasostGreat

i've got this code it compiles but it when I try to run it it says segmenatation fault [CODE]/* #include <stdio.h> #include <iostream> using namespace std; int rite(); int a,b; char g,f; int main () { size_t count; FILE * pFile; pFile = fopen ("in.h","r"); count = fscanf (pFile, "%d%d",&a,&b); …

Member Avatar for TasostGreat
0
137
Member Avatar for gsingh2011
Member Avatar for mtucker6784

Hi! First, I want to say that this is not any type of school assignment. I'm in the IT field and looking to work on learning C++. I've been following the book from: [url]http://msdn.microsoft.com/en-us/beginner/cc305129.aspx[/url] and I'm now trying things on my own. The program which the code below compiles will …

Member Avatar for Rashakil Fol
0
133
Member Avatar for serkan sendur

i wonder if i create an object from a class using new operator, and if i dont delete that object when i am finished using it, does it still remain in the memory after the program reaches the and of the main function? Thanks

Member Avatar for Free_Classified
0
468
Member Avatar for maddy05

this is a project made by me but its issue function is not working well instead of modifying and changing the value of issue to 2 it is adding another book with issue 2 in the file can some one correct it // **library management** // // **library members can …

Member Avatar for Murtan
0
244
Member Avatar for daviddoria

In integration.h I have this [code] class FunctionClass { public: virtual double f(const double x) = 0; }; [/code] Then in probability.h, I have this [code] #include "integration.h" class Mass1 : public FunctionClass { public: double Clutter; Mass1(double c) : Clutter(c) {} double f(const double x) { return Clutter * …

Member Avatar for _adam_
0
1K
Member Avatar for AdRock

I am still trying to come up with a simple solution where i add lines of words to a 2d array so i can pick an array element and display what is in that array I can read the lines of text and output which words are on which line …

Member Avatar for AdRock
0
178
Member Avatar for Ronen444

Hi guys... I've downloadws today the IronPython. One thing i've noticed that if you type, for example, 5+6 it calculates it..! So, i tried to do that with my App too, without success... Note: I've tried "if" sentences, but they are pretty useless... [B]Help![/B]

Member Avatar for _adam_
0
81
Member Avatar for Passiongamer25

I need help with my program. The program reads water temperatures and when they were recorded from an input file called " biodata2.txt." Then the output is displayed in a file called "results.txt" So the input file looks like this: 2 // number of readings taken 200707211245 // date recorded …

Member Avatar for Passiongamer25
0
92
Member Avatar for clutchkiller

I want my program to run on start up through editing the registry, how would i do that? Certain API's? or a specific way through c++ to do it? Or is that even the right method? Basically i would prefer to not use the startup folder in XP.

Member Avatar for cikara21
0
91
Member Avatar for serkan sendur

if the object is created on the stack, the destructor is called automatically when the object is out of its scope. if the object is created on the heap using new operator, the destructor is fired explicity by using delete keyword. i created an example to demonstrate both cases: [CODE]#include …

0
45
Member Avatar for Mahsa_C++

Hello everyone, I'm into writting a project ,that's all about dealing with directories and more specificly to code something that finally well work as"windows command prompt" in standard console.... i Got alot help from the experts here & got alot progressed, But a bug has occured in between: yestreday i …

Member Avatar for Salem
0
175
Member Avatar for Gigs_

HI, I have exe file writen in c++ or c and wanna decompile it to source code. Is that possible? If it is, is there any decompilet that can do that? thanks!

Member Avatar for Salem
0
9K
Member Avatar for serkan sendur

when i run my application i got "Memory fault(coredump)" run-time error, what might be the possible cause for this? Thanks

Member Avatar for serkan sendur
0
101
Member Avatar for teddybouch

I am trying to sort a linked list, and not being terribly familiar with sorting algorithms, I just found a merge sort on Wikipedia and decided to go with it. Hence, I apologize if I'm missing something obvious. Based on the printout statements that I inserted into the code, it …

0
85
Member Avatar for Nyaato

Hello, I'm currently programming a C++ Snake game and I'm stuck at a particular part of the program. This particular part had me wondering for sometime now, and I've got absolutely no idea how to work it out. I want to implement a collision detection between two snakes that would …

Member Avatar for Murtan
0
152
Member Avatar for Nicklorion

Hi, Could some one point me in the right direction. I'm trying to get a value thats in a file between tags. for instance: I'm reading an array out of a file per line example: [code=C++] myArray[0] = "<FILE_NAME>Testfile.dat</FILE_NAME>"; [/code] What i'm trying to do is to read every field …

Member Avatar for Nicklorion
0
144

The End.