General C++ Programming - January 2010 (Page 13)

How to use own definition header and body by separate ? (VC6)
 
Write function definition header in .h file, and write function definition body in .cpp file. How can I make linker know the definition body in the .cpp ? I...
[11 replies] Last: You can either put it in .h. Or put it in the .cpp where its actuall... (by iharrold)
efficiency
 
I'm trying to make that finds and prints out the largest numbers compared to all their neighbors. But i cant think of an efficient function that checks them. Pl...
[13 replies] Last: yes I am using Dev-c++ 4.9.9.2 and thanks Disch :D (by coolProgramer5)
customerize operater new to detect memory underrun and overruns
 
Hi folks, I am looking at the following pseudocode: static const int signature = 0xDEADBEFF; typedef unsigned char Byte; void* operator new(size_t size...
[1 reply] : some_ptr + sizeof( int ) yields different addresses, depending upon... (by jsmith)
by Nikhar
Suggest the algorithm.
 
Note:- I am NOT asking you to write the program for me. I am NOT asking you to do the homework for me either. All I am asking you is if you could suggest an alg...
[8 replies] Last: Thanks Jrevor. The link should help me. Anyone else? (by Nikhar)
Loadable modules
 
This sounds, to me, like something that would be extremely useful to know how to do. How would you write a program that can dynamically load different modules a...
[6 replies] Last: K, thanks. (by chrisname)
by Mark R
Question on revision date
 
The page located at http://www.cplusplus.com/doc/tutorial/ says, Last update on Sep 29, 2009" while the PDF file located at"http://www.cplusplus.com/ files/tut...
[1 reply] : I think the last revision of the web part simply added the pdf file. ... (by Bazzy)
advanced julian date calculator
 
I thought I did it all right until i compiled. It thinks the formula is multiple functions so help if you can. #include <iostream> // cin and cout (main ...
[4 replies] Last: endl is an I/O manipulator declared in the std namespace. Also, y... (by jsmith)
trouble
 
I'm trying to write a program that uses a two - dimensional array to find the numbers that are larger than all their neighbors. But I'm having troubles comparin...
[4 replies] Last: so i shouldn't make a new function and just clarify the size of the ar... (by coolProgramer5)
Julian day calculator
 
I am getting odd compile errors like (in dev C++) Line 30: stray \215 in program Line 30: 12 cannot be used as a function Line 31: expected ';' before ToD ...
[6 replies] Last: Glad to be of assistance. I hope you got over that ridiculous stupid #... (by tummychow)
write wstring to standard output? (1,2)
 
How do you write a wstring to std output? wstring str( L"testing" ); std::cout << str << std::endl; I assume this doesn't work because cout is an o...
[21 replies] Last: Thanks, that sounds good :D (by riderrocker)
dev
 
why cant i get anything to run on dev c++???a simple program wont even run on it.
[5 replies] Last: i got one called code:blocks it seems to work pretty good,my program w... (by moxyfike)
by Bezi
Problem with template Class and file linking
 
I have a cpp program consisting of a three files: 1. parser.h: includes the definition of a "template" class : template <class PType> class parser { .....
[3 replies] Last: You need to link to your file. You can compile your test.cpp to a lib... (by Bazzy)
Functions and Member functions.
 
What are required functions and member functions to enable the following program production the correct result.(Only need to write the declaration for functions...
[1 reply] : I'm sorry, but I can't even *read* that. Put it in code tags, indent i... (by tummychow)
Serial port's buffer flushing?
 
I'm working on a program which transmits data through serial port. I ended up making this code. It works good when run for the 1st time, afterwords some strange...
[3 replies] Last: Please tell me how to clear the serial port's buffer? I think tha... (by screw)
by alxfa
problem - read file to an array
 
Hey! Im trying to read a file, row by row, into an array. I do suceed,but when i run the program, it crashes. It seems to be a trouble with this line:"in_st...
[6 replies] Last: The problem is that you did not specify a return type for sortera(). ... (by hajen)
How to check is T a pointer in template<class T>?
 
Hello; I just want to check type T for a class or in a function with a type template. For example template <class T> void myFunc ( T x ) {...} How c...
[9 replies] Last: That's a really nice and smart solution. Code is a little complex b... (by Seregwethrin)
How to declare special instance of template function for some types
 
I got a question of possibility of creationg special instance of member template function of non-template class. I have, for example, class A with template memb...
[11 replies] Last: I'm with Disch, there is no further light I can shed on the matter. Ju... (by tummychow)
Problem with malloc and free
 
Hey, during the use of malloc and free I encountered an error in my function, but I was not able to localise it. char setPlay::m_setNameOfPlayer(int ge...
[8 replies] Last: No offence taken ;) Didn“t want to engender the impression, that you ... (by sheldon)
Follow-up Q...
 
So i got a problem with junkulet's work: http://www.cplusplus.com/forum/general/2697/ http://i48.tinypic.com/5alz75.jpg what's the possible cause of thi...
[1 reply] : Most likely you forgot to close off the function above it. (by Warnis)
Big Bad Bool
 
I have a series of integers inside of a class. When the class is initialized, it requires the user make a call to another function to give value to the integers...
[8 replies] Last: I figured. Wasn't trying to insult or anything so I put it down.... li... (by closed account S6k9GNh0)
January 2010 Pages: 1... 1112131415... 17
  Archived months: [dec2009] [feb2010]

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