Beginners - September 2014

Need help with a random number generator function.
 
I need to come up with a program that will randomly generate a number within the range of a user-inputted min and max. I have this so far but I can't figure out...
[8 replies] Last: This is how I do it, and it works well: int randInt(int a, int b) {... (by Toby12600)
Why are type aliases useful?
 
From what I understand, using the keyword typedef is basically giving a valid type a different name. Such as... typedef int integer; So now the word...
[3 replies] Last: 1) typedef are important for updating a software program for example ... (by novellof)
variables question
 
I am working on a project that is a calculator. I have the project done, but am trying to tweak the code due to one problem. When asked for a number, you put ...
[4 replies] Last: Use operator bool instead of good() member function. .good() sho... (by MiiNiPaa)
Debug check with cout, storage class type specifier
 
Is there a way I can do this and get around the "no storage class or type specifier" error? #ifndef FIRSTPLATFORMER_MAIN_H_ #define FIRSTPLATFORMER_MAIN_...
[1 reply] : You cannot place statements like that in the global scope; when would ... (by Zhuge)
Asking for number and output a character
 
How would I go about asking the user for a number and outputting a * corresponding to that number. For example, if I enter 4 the computer should spit out ****.
[2 replies] Last: it couldn't be easier than that. (by shadowCODE)
by leo255
Decimal to Hex Conversion - Not getting correct output
 
Hi all, Just trying to do a standard dec to hex conversion. I'm getting the output 6C6CC when the answer should be 6C0. I'd really appreciate the help! Th...
[3 replies] Last: One last quick question...If I change this to a void function, and the... (by leo255)
CalculatorTest & Calculator Project Dependency
 
Hello, I´m trying to get more familiar with cppunit, so i made an example Project for an Calculator with many functions. I started with a ComplexNumber Cla...
[no replies]
Program could capture the data from a USB port
 
I need to design a program, which could record the data from an USB port. Could anyone give me some suggestions where should I start? Or some informations. T...
[no replies]
Need Help with First Homework Assignment
 
Hello, I need some help, I'm using DEV C++ and trying to complete making my first program as my homework assignment. It involves calculating the average of 6...
[4 replies] Last: You're heading in the direction of arrays, since typing firstnum, seco... (by booradley60)
by Crogn
binary search
 
Iv been trying to write code for a binary search program but the below code keeps outputting 4 for reason... Any help would be appreciated that thanks in advanc...
[1 reply] : You used assignment in line 27 instead of equal to . if(... (by shadowCODE)
by Ch1156
Virtual
 
Ok so i've been practising on polymorhism and inheritance and I think I pretty much understand it all, but about virtual I used it like this, is this still corr...
[no replies]
Do-while loop help. I need this real soon.
 
I need help on cout<< 4. I dont understand on how to make the computer choose the minimun of the three numbers. #include <iostream> using namepace std; int ...
[4 replies] Last: you need to to change line 37 to just else and you need this else if ... (by cory244)
User input string to text file
 
Hey guys. I'm trying to make a program that reads a string that is entered by a user, and outputs that string to a text file. Everytime I run this code, the te...
[no replies]
logic question.
 
Simple question that i am not understanding fully I understand that int stores integers as whole numbers and that double can hold a decimal place. however if i...
[3 replies] Last: There are a few more considerations to take into account: http://en.cp... (by Computergeek01)
storing matrix in a string
 
I want to store a matrix of order N*N in a single string and than print the print the string which will give me display in matrix form(tabular) , this is so f...
[no replies]
'Counter" in craps program
 
Hello. I have written a code to run a game of craps...i cant figure out how to run it 100,000 times and count how many wins and losses there are and print the r...
[2 replies] Last: I would put most of that code into its own function: Status PlayCrap... (by Stewbond)
Use case diagram and Class Diagram
 
Hi guys, I am trying to construct a Use Case Diagram. I have 3 actors and 4 Use cases: Three Actors: Customer, ATM and Bank Four Use Cases: (1) Deposit mo...
[no replies]
How to find determinant of a matrix
 
How to find determinant of a matrix of order more than 2*2 , i found the code using recursive method on the internet but i can't understand it may be if it's im...
[2 replies] Last: i is never incremented in the det(int , int) function, but it is use... (by Sharan123)
by wolfv
Which is the better programming style?
 
I am looking for some opinions on programming style. The following two example programs both run as intended and are similar. The Row class is composed of an a...
[3 replies] Last: Thank you coder777 and JLBorges. The number of samples is a constant k... (by wolfv)
by CDavis
Text Parser problem
 
I have a code that I have to rewrite or rework and not really sure where to start I know I have to work in text phaser but unsure of the direction
[5 replies] Last: Wow I like that solution but other than text parser isn't there an eas... (by CDavis)
September 2014 Pages: 123... 51
  Archived months: [aug2014] [oct2014]

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