General C++ Programming - July 2009 (Page 6)

by eeh
implementation of delete[] operator
 
Assume code like: int* x = new x ; delete x; The delete operator doesn't take in the size of the array to delete! Where is the size of the new'd...
[1 reply] : short answer: Don't worry about it. It's magic. longer answer: E... (by Disch)
by eaon21
Machine Problem
 
I need an idea please. We were required to make a program using c++ that will help us in our future jobs as Computer Engineers. I guess thinking of an idea is m...
[2 replies] Last: How about a virtual machine? (by helios)
How do I add threading to socket program?
 
Hi I am 'trying' to get my head around multi-threaded programs. I have a working program (single thread) that uses a socket to listen on a particular port an...
[5 replies] Last: Here is what I would like to do - let me know if my logic is incorrect... (by strafford)
by jut
Inheriting specialised templates
 
I have a problem with the portability of inherited template specialisation syntax (GCC and MS VS C++) The following short example compiles and runs, and th...
[4 replies] Last: Thank you Dunoas and gestguikas. You have been very helpful. (by jut)
triggering another program to run using serial port
 
hello, is it possible that when i run a program on computer A, it will trigger the serial port of computer B so that another program in computer B will run? The...
[1 reply] : I'm pretty sure you'd need a program on computer B listening on the se... (by helios)
Cyclic Dependency
 
I have two class files which have object for each. But when I include them, it gives me error. Can someone tell me how to solve this issue. HeapNode.h: #inc...
[2 replies] Last: In your special case above, don't use #include at all. Use helios' ... (by kfmfe04)
Round off errors
 
i am in beg c++ and my instructor is asking me to find "some other combination that also does not work! Your loop should prove something similar for values othe...
[2 replies] Last: hey thank you. the website really helped me out. =) (by xiikryssiix)
Xerces and Dev-Cpp
 
I want to use C++ to read and edit XML files. I've heard of XML libraries and one in particular stands out, Xerces. The only problem is I'm pretty much a n00b a...
[1 reply] : You just need to OPEN the file, then read data from it. This is un-... (by fetag)
html and c++
 
Hello, I have a text document(ini file). I want to data from the text document to a table in a html document using c++ only, not java script. It's a http clie...
[5 replies] Last: You can have serverside c++ applications? (by smilodon)
separate macro and define's
 
I am looking at some source code for a project and before some (not all) of the functions there is a #SEPARATE What is this used for? What is the functional...
[3 replies] Last: #use is not standard. int32 is also not standard, so I don't unders... (by helios)
Making a class non-inheritable
 
How do I make a class non-inheritable in C++? I know that this can be easily achieved in Java using the keyword "final". How can I achieve this in C++ (other th...
[13 replies] Last: Hey, I just stumbled across this again in the C++ FAQ-Lite http://w... (by Duthomhas)
Pointers Question
 
Ok, so I have an interesting situation that I would like some other peoples input on. Here is a brief explanation. I am reading in a char array (all illegibl...
[4 replies] Last: Both. So I have a file of data. A lot of data. The data itself (not... (by skeptic)
function objects
 
Is there a difference between function objects, functors and function pointers or are they same?
[4 replies] Last: Thanks Duoas and Bazzy once again. I appreciate your help. (by n4nature)
function without a return statement
 
I have found the following code in a book #include <iostream> #include <string> using namespace std; class User { string name; int age; pu...
[3 replies] Last: I don't think there is a specified behavior, but I'm not going to read... (by Duthomhas)
c++ Application crashes at map :: insert function
 
Hi All, My cpp application runs fine on solaris & hp-ux but crashes on Linux.The application is crashing at insert() function of a map. The map variable is t...
[2 replies] Last: TMap.cpp is the sample pgm which gives the same logic used in my cpp a... (by AmitCPP)
by uzipaz
Error spawning cl.exe
 
Hey Everyone, I am using microsoft visual c++ 2006 version.. fews days ago when i build a DOS program, in the output bar.. the program was stuck saying compilin...
[no replies]
Problem with Inheritance in c++
 
I have a function under Base class and at the definition tine of this base class function I need to call another function which is define under the Derived clas...
[1 reply] : You have to declare F as a (pure) virtual function in Base. clas... (by jsmith)
Creating 2 output files from the data of one input file
 
Hi, I have a file with some car information in it. We'll call it cars.dat. I'd like to be able to use the input from that file to create 2 other files called...
[2 replies] Last: Awesome!! Got it. Thanks! :) (by binarysolo)
File stream I/O specifics...
 
So in my program I have a text file that stores data as follows: Grant Chase 45.98 Checking Harry Truman 337.05 Savings etc... How exactly do I ...
[1 reply] : In this thread a similar problem was exposed: http://www.cplusplus.com... (by Bazzy)
Where winsock2.h in linux?
 
I use SUSE 11.1 . I have a C++ program that is write for windows but i want to run this on linux. It is not a big program with many lines, but in it, is u...
[1 reply] : Linux doesn't have winsock2.h, or winsock at all for that matter. It's... (by firedraco)
July 2009 Pages: 1... 45678... 14
  Archived months: [jun2009] [aug2009]

This is an archived page. To post a new message, go to the current page.