Beginners - November 2012 (Page 48)

Function question
 
I have a function that must be used by a set of classes; these classes are not related by inheritance. What would be the best way to make this function accessib...
[4 replies] Last: Got it, thanks! (by littleneutrino)
prime number?
 
What is the code for finding which a number is prime or not?
[14 replies] Last: @lvlichael72 You created an infinite loop. the condition while (x !=0... (by Chervil)
Alternative of delay()
 
Can someone suggest me the alternative of delay() function in dos.h.I'm working on dev and it did'nt recognize this function.
[3 replies] Last: hope you get the hint.. (by Jikax)
object holding a list
 
i have this strange error, i have isolated where the error might be in the below code also, i tried to out this list<Item> bag; as part of the character o...
[2 replies] Last: thanks for your assistance, i figured it out. i will just make item_I... (by Imgregorywong)
Display Chinese in VC++ 6
 
I have a game source code that has been built in VC++ 6. Problem is when I try to display a Chinese message in a message box (that is customized message box to ...
[4 replies] Last: The problem is that VC++6 is pretty old. Better get a more recent vers... (by coder777)
Formatted file i/o C++
 
Dear forum members, I am trying to read values form a file. This file contains information, which in this case are the values of a 3D array printed in consecut...
[14 replies] Last: Hi all, Thanks for your help. I like the answer of cire very much. H... (by wronski123)
by vrakas
pow function of math.h
 
the pow function of <math.h> return double. is there any problem if i use it for integers e.g. (int)pow(4,10) ? Thanks
[1 reply] : as long as you don't use fractions there's no problem (by coder777)
Help with a returned function problem
 
I am having problems making the function to return a value, it ones dis but when the client number is more than 6000 is not going back to the no discount rate, ...
[4 replies] Last: I am new on this, so what you mean with code tags? You need to surro... (by Athar)
by oddboy
pointer to an enum?
 
hey gang, i'm new here, and new to c++, although i've done lots of programming in other (simpler?) languages. anyway, i'm trying to use a library on a mob...
[4 replies] Last: to use %n in a printf you need to give the address of the variable: ... (by Jikax)
Need to convert from ascii dec to char
 
I am writing a program to validate an isbn number. In my code I am instantiating an array of chars. Then I am trying to read in what the user types in (isbn num...
[3 replies] Last: If I make isbn a string instead of an array, then how can I grab one n... (by nathanielb91)
by EJonah
Input & Output problem
 
#include <iostream> #include <iomanip> using namespace std; const int SENTINEL = 'Q'; //type to stop the loop int main() { float A, G, V; fl...
[3 replies] Last: Hmmm - perhaps number is not a good name for a variable that is a char... (by TheIdeasMan)
by mHart
String Conversion
 
Attempting to read in the file data which is a set of temperatures in a year. For my functions displayAvgTemp, displayLowestTemp, and displayHighestTemp I'm ge...
[1 reply] : @mHart print is an array of string but you are comparing it to an in... (by TheIdeasMan)
by ichicc
Newton Raphson to find roots of polynomial
 
Hey all, I'm new to C++ and programming in general. I'd like to write a program that uses the Newton Raphson method to calculate a root of a polynomial (determi...
[no replies]
Floating point exception ?
 
This program is supposed to use 3 functions to calculate the factorial of 2 inputs and then find the # of combinations between the two factorials. It compiles c...
[2 replies] Last: FINALLY... after 4 days i finally got this done. thanks man (by byronflds)
Merging Functions. Help on the main?
 
So as far as i know I got my function working but i'm stuck on how to implement it in main. Help please? #include <vector> #include <iostream> using names...
[4 replies] Last: the function returns a vector, so initialize one: int main() { ... (by Cubbi)
2D array initializing problems
 
Simple homework problem.. I am having a problem with the second bridge for mouse island I commented the problem. oh and I know I have my x and y backwards......
[9 replies] Last: problem solved .. #include <iostream> using namespace std; main... (by gratholio)
Passing arrays by reference
 
#include <stdio.h> #include <assert.h> #include <stdlib.h> #include <string.h> void allocatearray( char ** &matrix) { int i,j; matrix = new char*...
[6 replies] Last: Your allocation function looks wrong to me. To allocate arrays of mult... (by Zhuge)
alphabet
 
Hey I have to output in alphabetical order. It was working when I did it on a test file which was less then this one This is what I got for output Letter ...
[2 replies] Last: OK so here is where I'm at the function is sorting correctly because u... (by jlillie89)
by emk0
How to send variables from one function to another
 
Hello, My task is to type and read() several double variables and store them in vector, then the function compute() should calculate the sum of all variables s...
[2 replies] Last: Use the address of operator for the average and sum variable on line 1... (by dtaqee88)
by areej
can you helpp me plz
 
Questions: 1. Write a program that reads two integer numbers and calculates the result according to the option chosen from the following menu: ***************...
[2 replies] Last: you wrote exit(o) instead of exit(0) (by Darkmaster)
November 2012 Pages: 1... 4647484950... 75
  Archived months: [oct2012] [dec2012]

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