General C++ Programming - January 2011 (Page 15)

by Faim
Classes with template
 
Hi,i tried to write a code to compare the classes with templates but this code is not working.I think i shoul use operators but i don't know how to write it in ...
[6 replies] Last: I deleted X var and then it is solved. Thanks lot to guestgulkan and ... (by Faim)
by Bezi
How to catch error when deleting a pointer?
 
I have a piece of code, where at some point I need to delete a pointer to get sure that the memory is freed. However, sometimes the memory for this pointer is n...
[13 replies] Last: Exceptions are, as their name implies, for exceptional circumstances*... (by Bezi)
by Rinu
Array Merge
 
Which is the best algorithm used: there are two arrays : A sorted in ascending order and B sorted in descending order. a new array C is made to merge A and B ...
[9 replies] Last: Hi Rinu, C++ provides a standard set of containers for storage and ... (by PanGalactic)
Creating Registry Keys in C
 
Could anyone help me on how to write registry keys in c? I don't know how to. Please help me. Thanks Guys.
[1 reply] : http://msdn.microsoft.com/en-us/library/ms724875%28VS.85%29.aspx (by guestgulkan)
read write binary/text file
 
Hi, I have written a program to read from a text file which contain ID and name in this format : 1234567 John Woo 1113456 Kenny Alexis Paton and write...
[no replies]
delete and delete []
 
Hello, I got confused about delete and delete especially about delete . Let's take an example: struct SomeItem { SomeItem(){ ... } ~SomeIte...
[3 replies] Last: Thanks, That really clears the confusion (by enliten)
by Salamu
member function overloading
 
Hi, I am new to c++ and managed to write this much of code, i dont know what should I write inside of Vehicle and get_line functions. Could you point me how ...
[1 reply] : That would depend on the layout of the file and what you want to read ... (by Zhuge)
modify the value in pair<>
 
vector< pair<string, double> > var_map; ...here pushes pairs into var_map... var_map.back().second = 4.3; why can the last line not modify the value ...
[3 replies] Last: Oh! I made a mistake somewhere else. :-( (by timothyguo)
So there is no way to 'do something' in the Windows console without user input?
 
I've seen people portray programs they have made as a console program, but it would have moving text, while it waits for the user to input something. Like | t...
[1 reply] : No, it was not. http://stackoverflow.com/questions/199336/print-spi... (by Moschops)
Difference b/w sql.h ,sqlapi++.h and msado15.dll
 
Hi, I want to connect the my ms-access database file from the c++.currently i'm using the msado15.dll using import in VC++ I need to know is their any oth...
[5 replies] Last: SQLAPI++ is a general purpose SQL database access library with support... (by kbw)
Calculate average from histogram
 
// problem solved
[1 reply] : save your scores in the array sum all of the scores of your array and... (by stereoMatching)
Using GMP for GARGANTUAN numbers
 
I need to use long numbers in my factor finding program. I am now aware of header that you can use called GMP that's very precise. So I downloaded it from this ...
[no replies]
by Emir
Design Issue: Derived classes need info about other derived classes
 
Hello everyone, I've got an interesting situation. There are three classes [named "A", "B" and "C"], all derived from a abstract base class [named "base"]. H...
[9 replies] Last: Yes, I knew that this was the case. I threw in the idea very lightly a... (by simeonz)
by Bezi
Code Efficiency Question
 
I am wondering if theoretically / practically there is any difference between efficiency and speed of these two codes: MyClass a; for (int i =0; i<N; i++){...
[2 replies] Last: If MyClass has a trivial constructor, copy constructor, assignment o... (by PanGalactic)
check my mistakes and tell me please
 
Hi programmers please check code and tell me my error why is it not showing values on input of some numbers. Write a program in C++ that computes the mini...
[4 replies] Last: not showing correct errors. What? Oxymoron. Double thread http://... (by ne555)
find correct answer (c++ program)
 
Hi please check code and tell me my error Write a program in C++ that computes the minimal and the maximal value of function f(x,y) obtained on an integer p...
[1 reply] : You aren't storing the minimum or maximum value. Looks to me like you'... (by Moschops)
Working with File I/O
 
I'm working on a program that provides a simple telephone directory. I have had it working in different stages of its development and believe that I almost hav...
[3 replies] Last: Use code tags! (by king214)
How do Manipulators work?
 
http://www.cplusplus.com/reference/iostream/manipulators/oct/ If we do ostringstream os; lalu os << oct; what is oct? What is the type of oct? ...
[5 replies] Last: huh? no. struct manipulator{ virtual ostream& manipulate(ostream&); };... (by hamsterman)
Speaker output
 
Is there a library for speaker output? I want to generate custom sound without using a .wav file. I'm hoping to (eventually) experiment with sound generation em...
[7 replies] Last: Yeah but I don't know how to stream your own audio with it. I couldn'... (by Disch)
Writing text to a textfile
 
I'm relatively new to C++ and I'm working on the textfile concept now.. I'm having a problem opening textfiles and for some reasong the textfile is not saving i...
[3 replies] Last: i solved it now thanks anyways hehe :) tho i do have another probl... (by jbonello1)
January 2011 Pages: 1... 1314151617... 24
  Archived months: [dec2010] [feb2011]

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