Beginners - April 2012 (Page 18)

do while for if statements CODEBLOCKS C++
 
Write a program that will ask the user for a set of ten numbers. After all ten numbers have been entered, the program will display the largest and smallest numb...
[7 replies] Last: You get that value because in your code min and max are not initialise... (by vin)
Help!
 
I have this assigment to do for a beginners programing course but I have a problem. this is my code here: #include <iostream> using namespace std; int ma...
[2 replies] Last: Thanks it worked! (by dhawkins)
by farmer
Most efficient/cleanest way to check user inputs
 
I'm writing a program that has a large section of code with a lot of user input of different types. For example cout<<"Please enter student name: "<<endl;...
[no replies]
How to Call Member Function from Pointer?
 
Hi, I'm kind of new to C++ programming, so if anyone could help me with this question, I'd really appreciate it. So I've got a class of object called studen...
[3 replies] Last: Perfect! And with that, my assignment works like a charm. Thanks guys! (by jojo212)
Can't understand why my iterator won't work.
 
I am trying to write a class (called LongInt)that functions like an integer that can hold any integer regardless of size. It stores individual "digits" as chara...
[2 replies] Last: I chose it because it is an assignment for my class. We are learning a... (by Halo Fan)
Need Imediate help please
 
#include<iostream> #include<conio> #include<cstring> class decimal { private: int dec; public: decimal(); decimal(int); void input();...
[1 reply] : 1. Use code wrap 2. Indent That code is very illegible the way it is ... (by paulthepenguin)
by kready
I just cant do arrays!!
 
My teacher gave us this assignment. You are to write a program to compute salaries and bonuses for a company. The plan is that each salesman who exceeds the...
[4 replies] Last: Also forgot to include this in the last part. Im just going to assum... (by zertech)
Linked Lists
 
I'm a little confused about creating an insert method. What I've discovered is you have to traverse the list to find certain things. What makes this very confus...
[10 replies] Last: ^ +1 (by Vlykarye)
Quiz Program Problem?
 
Hello, this is my second program so far, and I've got everything working alright except for one small thing... When the user types 'help' when they start up the...
[13 replies] Last: Take a look at this code. It is an example of what you could do to mak... (by Vlykarye)
Concat two linked lists
 
Can someone help me get this started? I need to write a program that concatenates two linked lists. I am getting some interesting errors. It is defined in my...
[2 replies] Last: Hi Vlad, Sorry, here is my driver: #include "List.h" int main() {... (by iDontGetIt)
Clearing Console Window
 
Is there any way to clear the console window whilst still staying in the program and having it continue to run?
[1 reply] : Assuming you are in a Win32 console, use: system("cls"); This funct... (by cantide5ga)
writing to a txt file
 
I'm trying to calculate the time taken for running selection sort v/s merge sort. The time taken is on standard output using cout. However, I want to put this i...
[1 reply] : I got it, my sort.txt was in a different location from devc++ Works fi... (by cpplover)
Random Number Game Sample
 
#include <iostream> #include <stdlib.h> #include <time.h> #include <string> using namespace std; int main() { int random_number; int guess; ...
[3 replies] Last: Isn't the srand() function seeded wrong here. I'm not entirely sure ho... (by TheBeardedQuack)
Question about arrays.
 
For my C++ book (C++ without fear) I made this program for a random number generator and an array. It tells you how many times a number between 0 and 9 is picke...
[2 replies] Last: For this to work you need a for loop in the beggining that initalizes... (by Cubbi)
Wont compile multiple files
 
Hi I have a program that should place a number of fish randomly in a "bay", this code compiled fine on the school computers, but i cant get it to compile at ...
[2 replies] Last: ahhh! duh, forgot we had made 2 programs, i shouldve just compiled B.c... (by Omar Alamy)
fstream question
 
I am doing a programming project for my class and I am in need of a little help here. I am unsure of how to write the code for the program to take in the info ...
[1 reply] : for each line read from the file - use std::getline() a. loca... (by JLBorges)
Math in program not working right
 
Hello, I've just updated my quiz program of which I had started to code yesterday. I added a new question, so now there are a total of 16 questions. At the end ...
[4 replies] Last: Yeah, it works fine now, thanks again. (by doompickle)
Computer allocates same pointer twice
 
So I have this code snippet: Vector * vec; for ... { vec = new Vector(x,y,z); doSomething(vec); delete vec; } with void doSomething(Vector * vec) { Vector...
[5 replies] Last: I just don't know any other way. The other way is to use the normal ... (by Athar)
by ozone
need help
 
hi am just a newbie in c++ and i got this assignment, i dont know what to do am just freaking ma self out. here is the question . "If we list all the natural ...
[9 replies] Last: thanks to u all am really glad to meet u. best regards (by ozone)
Binary Tree Rotation.
 
Solved. Thanks guys.
[3 replies] Last: You need a function that generates labels. To generate a label for a n... (by hamsterman)
April 2012 Pages: 1... 1617181920... 66
  Archived months: [mar2012] [may2012]

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