General C++ Programming - May 2013 (Page 4)

ACM binary search question
 
Hey, this is the link to pdf : https://icpcarchive.ecs.baylor.edu/external/22/2220.pdf This is some problem releted with binary search. I understood what bin...
[no replies]
Updating projectiles in my program
 
Hello everyone, Right now I am working on a program and I am having some difficulty with a function within one of my classes. I should also mention that I am...
[no replies]
How to compare values of two objects of the same class.
 
Hi all, Running into a snag in my program. I can't seem to figure out how to have an object of a class be able to look at all the other objects of its own clas...
[7 replies] Last: Thanks for the reply. I'll definitely check out the observer pattern.... (by MilesAway1980)
Why this assignment work?
 
Hi, I have a struct like struct { quadw ; } quad; class MyObject { quad myValue; const quad& getValue const{ return myValue;} } Do ...
[4 replies] Last: thank you very much. (by chrisben)
Problem in for loop condition using sizeof()
 
hey i made a program that calculates bills class television //TELEVISION CLASS {...
[11 replies] Last: @MikeyBoy yes now i know my condition is wrong. Yes you are right op... (by dedlier)
i should i modify this??
 
1. #include<stdio.h> 2. #include<conio.h> 3. main() 4. { 5. int ncr; 6. long n,r; 7. clrscr(); 8. printf("\n Enter value of n and r"); 9. scanf("%ld%ld"...
[no replies]
calling java classes in cpp
 
i want to call some java classes which are available from a cpp file.do share your thoughts.
[1 reply] : There is quite the share of information about his in google for exampl... (by tath)
Operator Over Loading Help Please
 
write c/c++ code of overloading ^operator in complex number class. If we have two objects of complex number class as fellows,complex obj3 =obj1 ^obj2 ; Obj3...
[1 reply] : http://www.learncpp.com/cpp-tutorial/91-introduction-to-operator-overl... (by MiiNiPaa)
I'm getting an error when I try to compile my code
 
I'm writing a command line based C++ program which will add some details to a struct array and which will retrieve them needed I'm only facing one compiler erro...
[10 replies] Last: Well, at risk of stating the obvious, you need to actually set the val... (by MikeyBoy)
An example of tree structures
 
#include <iostream.h> #include <conio.h> #include <stdlib.h> #include <math.h> class tree { public: void insert(); void inorder(tree *); void dele...
[no replies]
error:call of overloaded is ambiguous
 
directory.cpp:104: error: call of overloaded ‘VVisit(bool&, rc_t (*&)(const slib::fDirectory*, uint32_t, const char*, void*), const char*&, void*&, __va_list_...
[2 replies] Last: Having two methods with the same name, one of which modifies the state... (by MikeyBoy)
how to set fixed length for string ?
 
Input The input consists of one or more packets followed by a line containing only # that signals the end of the input. Each packet is on a line by itself, ...
[2 replies] Last: Have you tried std::string instead of char ? (by ajh32)
Pyramid Display
 
I know i am missing a for loop somewhere. I want to make this display a pyramid, im practicing my nested loops because it has been a while. Heres my code // ...
[6 replies] Last: This question come up soooooo many times. (by ajh32)
by andmon
minlbfgs_numdiff and the likelihood function [solved]
 
Hi all, I would like to find the minimum of a likelihood function using minlbfgs_numdiff (numerical differentiation) in alglib. Clearly, my function depends ...
[no replies]
Overloaded assignment operator for class template objects (1,2)
 
I designed a class template to create unique arrays. I was able to successfully input data to and output data from my array objects, irrespective of the datatyp...
[30 replies] Last: Eureka!! Hurray!! Yeehaw!!! Are there other exclamatory outbursts ... (by geeloso)
I need help in understanding how the functions works in the program inorder to identify the lowest value in the array
 
#include <iostream> #include <iomanip> using std::cout; using std::endl; using std::setw; double& lowest(double values , const int& length); // Function ...
[no replies]
Code::Blocks or Microsoft Visual C++?
 
I Want A New IDE But i Do Not Know Which. Which Is Best And For Which Reasons. Can Someone Help. Thanks
[9 replies] Last: why not use both? (by Yanson)
by NGen
Binary Sort Performs Worse than std::sort
 
I'm trying out my own implementations of a few sorting algorithms/containers and am comparing performance through benchmarks. I've found that my implementation ...
[9 replies] Last: I'm going to just chalk this up to cache misses, unless anyone's got a... (by NGen)
Help with do-while loop please
 
I'm building a program for school that is supposed to be kind of like a slot machine. Except it is simulating three dice rolling, and different combinations (mo...
[2 replies] Last: ok. i ended up needing a well carefully placed }. thanks for looking a... (by FailureToLogic)
ncurses and line feed in multi line fields
 
Hello, not sure if someone can give me a hint how to solve/approach my problem: I'm currently developing a very light database application for using on li...
[no replies]
May 2013 Pages: 123456... 47
  Archived months: [apr2013] [jun2013]

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