Beginners - October 2013 (Page 25)

Arrays Project
 
Write a program to: 1) Read N(set max to 500) numbers from the keyboard (provide a method to end the input). 2) Ask the user of the program if the program sh...
[1 reply] : cout << "Please enter your numbers"; cin >> n; This will not work... (by Mats)
please i need help
 
write a c++ program that inputs birth date of the user (bd/bm/by) and the current date (cd/cm/cy) it should calculate your age
[2 replies] Last: i solve this (by max v max2)
Function with Arguments
 
Hi gang, I've just started out with Beginning C++ for dummies and the Function with Argument has me stumped. I just cannot work out what the hell is going on....
[2 replies] Last: So the nValue in main(), will be assigned to nTarget in factorial(). ... (by TheOrgano)
HELP! getline() confuse me
 
Excuse my english. I am trying to write a code that a computer will ask me to type my first name and last name then after that the computer will ask me again to...
[3 replies] Last: Here is your code fixed. Study it... #include <iostream> #include... (by Manga)
by moreme
passing argument through constructor
 
Hey guys, A simple question, I want to initialize my variables in a class using a constructor. the data will be taken from the user, stored in local variable...
[6 replies] Last: mikeyboy was right, your code is valid, except less of semicolon for c... (by chipp)
by cshu
I need help with fixing error C2679
 
Im working on a queue program, I cant get it to work because of one error here is what im getting: d:\cmpsc212\projectpractice\projectpractice\source.cpp(39):...
[1 reply] : try #include <string> (by Yanson)
Using incriment withing printf
 
So, I have something like this int a=0; char charArray ={"cat","dog"}; printf("%s %s",charArray ,charArray[++a]); I'm expecting this line ...
[6 replies] Last: Thank you, everybody. (by Stremik)
Getting multiple values in a function
 
How come this returns a zero? #include <iostream> #include <cstdlib> #include <iomanip> using namespace std; double calcPay (double hours); int main() ...
[5 replies] Last: No. I meant to do all the calcs in calcPay. Sorry if I worded that poo... (by closed account D80DSL3A)
by amdv
calculating pi
 
Hi everyone, having some real trouble with my work. It is supposed to be a function that calculates pi to an accuracy specified by the user. More info: ...
[15 replies] Last: now you have an undefined value for n so that's even worse than 0. Loo... (by giblit)
Help fixing an infinite loop
 
I'm getting an infinite loop. My code seems right to me so I can't figure out how to fix the infinite loop A file name is passed to the function. The point o...
[2 replies] Last: line 21 looks like a possible reason... in order for that loop to s... (by Manga)
Menu help
 
can you help me get this menu to work! here's it is //Library includes Here!!! #include <iostream> using namespace std; //Global Constants Here!!! ...
[1 reply] : Hi there, Especially when posting a large section of code like this, ... (by closed account o3hC5Di1)
How to equal using assignment operators
 
it shows insertion operators error but works when i use string #include<stdexcept> #include<conio.h> #include <iostream> using namespace std; class ...
[4 replies] Last: can't we do that without using operator overload for<< Of course we ... (by Chervil)
private member intialization
 
I was told private date cant be intialized but when u write class any { private: enum {Size =80}; this properly works are there other ways to intia...
[9 replies] Last: But it can :) http://forums.codeguru.com/showthread.php?324490-quot-En... (by mutexe)
Making a Strobelight in C# XNA.
 
http://pastebin.com/XNMVg5Xn My code is too long, so I used a pastebin. Under the protected override void Draw(GameTime gametime) I declared the backgrou...
[3 replies] Last: What you need is a timer and an index. Each time you get the timer ev... (by coder777)
by leo255
Need help with Fstream - Reading numbers from file, & separating rows
 
Below is a simple little program I made. I need to read a file with x amount of numbers in a row, and y amount of rows. For each row, I need to output the infor...
[1 reply] : Using eof() in a while loop like this is wrong: while (!fileIn.eo... (by Chervil)
by Zexd
divisorz
 
I want to create a function which will take a number and allocate an array which will be 'filled' with its divisors. Now, after the line: cout << number << ' ...
[2 replies] Last: Or simply void GetDivisors(int n, int *&divisors, int &n_elem); Th... (by Zexd)
overloading pointers
 
it shows zero value for d3 but it's suppose to add d1 and d2 value to get total in d3 #include<stdexcept> #include<conio.h> #include <iostream> #in...
[6 replies] Last: Thank you (by Sharan123)
How To make a function that reverses a string
 
Well i was just wondering how to create a string reverse function as there is a include file 'string.h' which contains the strrev function.Just for knowledge sa...
[3 replies] Last: Ohk ... i actually tried to reverse a string like storing the last cha... (by SiddharthShenoy)
Entering values into two arrays in c++
 
Hello, I am trying to write a program that prompts the user for 12 integers that represent rainfall averages for a year, then prompt the user for 12 more intege...
[1 reply] : Hi there, If I understand your question correctly - the program only ... (by closed account o3hC5Di1)
Write bool expression to tell if a list is increasing
 
I have the program below given and I was able to complete the assignment to a certain point except in adding a menu option that gives a true/false return if the...
[1 reply] : Hi there, You should iterate your list, keeping a boolean variable. J... (by closed account o3hC5Di1)
October 2013 Pages: 1... 2324252627... 86
  Archived months: [sep2013] [nov2013]

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