49,761 Topics
| |
Hey. I am trying to output a file. I pretty much have down, but the only problem is I'm getting the last set of my numbers and missing the other 5000 or so sets. Here is what I have [[ICODE]for (int i=0; i < N_plates; i++) { cout << i … | |
i got compiler error stating that : Only static data members with const integral or const enumeration type can specify an initializer in the class definition what is the logic behind that? why is the compiler designed not to accept any non constant static initialization of types? | |
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. | |
[code]#include<iostream.h> #include <string> using namespace std; struct sdata { char name[5]; int reg; }; struct sub { char subject[30]; sub * move; }; void instudent(sdata & ins ); void show(sdata * ins); class inf { sub * begin; sub * look(int limit) { sub *pointer=begin; for(int i=1; i<limit; i++) pointer=pointer->move; … | |
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 … | |
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 … | |
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 | |
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 … | |
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. | |
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 … | |
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> | |
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.. | |
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 … | |
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 … | |
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--; ){ … | |
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 … | |
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 << … | |
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); … | |
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 … | |
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 | |
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 … | |
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 * … | |
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 … | |
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] | |
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 … | |
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. | |
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 … | |
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 … | |
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! |
The End.