General C++ Programming - March 2013 (Page 32)

va_list or operator overloading in the case of adding strings.
 
void incr(unsigned short x,...){ va_list arguments; register unsigned char *cur_arg; va_start(arguments,x); do{ cur_arg=va_arg(arguments,unsigne...
[no replies]
Help With Scheduling Program
 
Hello all. I'm trying to make a program that--using the provided date--will create the optimum schedule to see 3 different movies. The data provided will be:...
[no replies]
What is wrong with my stack?
 
I built a stack, and it runs fine is I put the main function in the stack.cpp file instead of using a seperate cpp file for main, but once I put main in its own...
[3 replies] Last: An often used convention is to put your templates implementation into ... (by tcs)
Can anyone help me with this? any help would be greatly appreciated!
 
Okay here is a program that i have to write but i cant seem to get to run with what i have. /***************************************************** Write a...
[3 replies] Last: I'll give you a skeleton program //preprocessor directives example... (by Yanson)
by ljs
timing a program
 
Hi! I have a code and I amn considering 3 implementations for a particular piece of it. I need to measure which implementation is the best in terms of performan...
[2 replies] Last: May be you'll find some interesting articles when search cplusplus.com... (by tcs)
free() invalid next size (normal)
 
Hello, There is my Integrator_Cauchy class: template <typename T_out,typename T_contour ,typename T_in> class C_Integrator_Cauchy: public C_Integrator{ p...
[1 reply] : http://jcatki.no-ip.org/fncpp/TestCase (especially points 6 and 7) s... (by ne555)
How to check if std::hex is set
 
I have made a class named luint for handling very large unsigned integers. I want to overload the input and output operators std::ostream& operator<<(std::ostr...
[1 reply] : if (stream.flags() & std::ios::hex) { // "std::hex is set" } ... (by Peter87)
Line to Line intersection not working.
 
I am trying to do some bullet collision detection in a platform game. I want this to be continuous collision detection so my method is 1. To represent a bullet...
[4 replies] Last: Ok, so I've fixed it now. Turns out it was a dumb-ass mistake I'd made... (by closed account 2NywAqkS)
Text-based game idea
 
I want to create a text-based game with C++, running on the console. Since it is going to be an online tutorial, I wanted to know what you guys might think of ...
[2 replies] Last: Thanks! What kind of text games do you think are good for beginners? 1... (by Donanza)
Rectangle Class C++, please help!
 
my professor is asking us to make rectangle classes with C++ can someone make the following program easier to understand please? thank you! Design a class n...
[18 replies] Last: As ajh32 said especially on this web site. The examples there will fit... (by tcs)
COSINE not working properly
 
Good morning everyone, I'm writing my first program using windows form. i have included math.h. when evaluation a cosinus of a number. the value i get is wron...
[7 replies] Last: I make 2.0*cos(1.57) approx 1.59e-03 But 2.0*cos(3.14159265/2.0) appr... (by mik2718)
by qingze
About Normal distribution
 
I am generating random number of normal distribution (0,1) but i suspect maybe I have done it wrong. The generator I use right now is srand(time(0)); std::...
[4 replies] Last: You have defined two random generators gen and generator . One is p... (by Peter87)
Callback Quandry as in "HELP !!!"
 
I am fairly new to C++ but have 15+ years in C. What was relatively simple in C is confounding in C++, passing a callback 'address' to be used for a dynamic cal...
[no replies]
Run-Time Check Failure #2 - Stack around the variable 'aux' was corrupted.
 
cant find my error :S Run-Time Check Failure #2 - Stack around the variable 'aux' was corrupted. #include<iostream> using namespace std; bool TestaSe...
[7 replies] Last: simply your loop should be declared correctly.. int Iarray = {0}; ... (by joneele)
Dynamic Memory use and explination?
 
I have been going back over C++ and there seems to have been a lot of stuff that I didn't cover. I learned it from TheNewBoston so I blame him for not finishing...
[6 replies] Last: Ok thanks for the help! =) So int* x; points to nothing (a null poin... (by CppCoder101)
by cppct
Exception Handling
 
What is the need to go for nested try-catch like as below void f() { try { //Some code try { //Some code ...
[2 replies] Last: Like @MiiNiPaa has stated it is difficult to say due to the lack of co... (by ajh32)
Winsock program that performs simple math
 
I have an assignment that takes existing client and server code that's currently able to connect over an address and port and share data. We're asked to add ...
[no replies]
Help on a coordinate plane
 
Hey can anyone explain to me on how to contrusct this and make it complie? i was looking through my c++ book but im still new too this and i was confused on thi...
[1 reply] : int main(){ const double X_ACC = 0; const double Y_ACC = -9.8... (by MiiNiPaa)
Trees
 
Suppose you have a tree, with root node R and the you must paint every node in the tree red. You may only paint a node if you have painted its parent. How many ...
[no replies]
long run time
 
I HAVE BEEN TRYING OUT PROJECTEULER.NET PROBLEMS I AM HAVING DEV C++ ON MY 64 BIT SYSTEM I AM A ROOKIE IN PROGRAMMING BUT MY ALGORITHMS ARE CORRECT WHAT H...
[2 replies] Last: Please use code tags (look for the <> button)to make your code more ... (by cire)
March 2013 Pages: 1... 3031323334... 51
  Archived months: [feb2013] [apr2013]

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