General C++ Programming - October 2014 (Page 10)

Help understanding my homework assignment
 
A complex number has two parts: a real part and an imaginary part. These numbers are written A + Bi where i = √(-1). For example 3+4i and 1-2i are complex n...
[1 reply] : Forget the "complex numbers". You don't need to know their math here.... (by keskiverto)
Linear search vs Binary search
 
Can someone tell me what advantages could linear search have over binary search? It seems to me like binary search is better in almost every way seeing as it's...
[4 replies] Last: Another reason is that binary search requires more code, so on a devic... (by dhayden)
C++ help
 
/* * @author Damian Bloch * Chapter08 Project02 * Program is to let the user enter a string and * will output the sting in all uppercase letters. */...
[1 reply] : You want getLine: http://www.cplusplus.com/reference/istream/istream/g... (by dhayden)
by juaok
Having a struct as a key for a map
 
So why does this not work? As an example: struct example { int x; int y; }; int main() { example variable; variable.x = 1; variabl...
[4 replies] Last: > since there is no equality operator Must be LessThanComparable ; ... (by JLBorges)
C++ arrays help
 
Write a program that reads a file consisting of students’ test scores in the range 0–200. It should then determine the number of students having scores in e...
[4 replies] Last: thanks I think I can do it from here (by damianbloch49)
C++ Exceptions as part of general programme flow
 
Like most programmers - at least of my mediocre skill level! - I am a bit shy of using exceptions. I am never comfortable using try/catch/throw and testing f...
[13 replies] Last: Yes, it's an excellent point that you want code that is hard to use wr... (by dhayden)
Help with C++ Word Guess Game
 
So I've been trying to get this word guess game working, but the word so far is not showing. For instance, if the word input by Player 1 is "bell" and Player 2...
[3 replies] Last: The problem is you're initializing soFar at line 14. At that point, t... (by AbstractionAnon)
Implementation of Singleton?
 
I need one copy of a class object throughout my program so I decided on a singleton. I used the basic design of: class ImageManager{ public: static ImageMan...
[2 replies] Last: Do you need an object? Wouldn't something along these lines suffice? ... (by JLBorges)
by drax
string arrays loop
 
Hi, I need some help in understanding how to do loops with string arrays. If I have few string arrays with some elements, for example: string pizza = {"h...
[2 replies] Last: Great, thank you very much! (by drax)
const in class meaning
 
Hi. Whats the use of using int funct() const; in class declaration? Because my class functions work even without using const. Also what is meaning of int& func...
[6 replies] Last: No. typedef type T In your example, you're using the word "type" in t... (by helios)
virtual destructor
 
class Base { public: virtual ~Base() { cout << "Calling ~Base()" << endl; } }; class Derived: public Base { private: int* ...
[11 replies] Last: Just to clean up your analogy a little bit... The base class would be... (by doug4)
x86 bare minimum hardware?
 
In a x86 compatible pc, what hardware is assumed to always exist (with the rest being optional/detectable)?
[no replies]
i have written my code!! but i need someone to remake it!!
 
so i wanted someone to remake the code that i`ve written to have : a recursive function to evaluate the first n terms in series specified y= 1 - x + x^2/2 -...
[12 replies] Last: You can see that every term in the summation produce the next by: r n ... (by tdmihos)
Hey i need help on writing a program
 
Suppose you want to deposit a certain amount of money into a savings account, and then leave it alone to draw interest for the next 10 years. At the end of ...
[4 replies] Last: i lol'd (by zoran404)
by y510
Generating a time series by using Uniform Distributed Random Number Generator quickly please!!!!
 
My assignment is as so: " Visual C provides a function RAND() to generate a uniformly distributed random value between [0, 1]. (You must include “stdlib.h”...
[1 reply] : #include <iostream> #include <random> #include <iomanip> #include <cs... (by y510)
vector
 
can someone please help me? how can I create a vector with the following devices: printer, disk, cd/rw. so the user is going to ask first for the number o...
[5 replies] Last: :) the computer is your friend not your enemy void deviceSetup (vect... (by coder777)
copy/Constructor and destructor help!
 
Hi, My teacher gave us this problem for homework after horribly explaining the process. Can someone help with the main program? I have an idea of what it sho...
[5 replies] Last: The correct way is: //Complex.h class Complex { public: Complex(... (by LazaroBinda)
Pass-by-reference
 
I need to return taxes paid and net pay by pass referencing a gross pay overloaded function. Are the values returned from calling the overloaded function file s...
[8 replies] Last: Thanks wildblue! This forum has been very welcoming! (by Kendrakendra)
Building Glib on Windows XP
 
I'm trying to configure GLIB on windows XP using a MINGW compiler. I'm also using the MINGW command line MSYS. While it is going through the process of conf...
[5 replies] Last: Maybe some help here: http://sourceforge.net/p/mingw/bugs/2216/ (by norm b)
please help!
 
So I need the process to terminate for the number of processes which have arrived. but it just dies once.
[2 replies] Last: First thing i see is that you want line 20 to be ==, not =. You're doi... (by Ganado)
October 2014 Pages: 1... 89101112... 38
  Archived months: [sep2014] [nov2014]

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