Beginners - November 2013 (Page 24)

array of pointers to functions
 
Hi.I'm trying to find out the solution of next task: Create a class that contains a vector of pointers to functions, with add( ) member function to add poin...
[3 replies] Last: Thanks .Now I find out the problems. (by fitipaldi)
what code should i use?
 
can someone help with the code to put these in ascending order? // Number Sorter #include <iostream> using namespace std; char menu() { c...
[1 reply] : Simple algorithm for ordering an array is switching and solving for ex... (by snowright)
vector problem
 
Is newones.end() number??? while (w< newones.end( )) { if(w==a) { continue; ...
[1 reply] : Assuming that newones is an std::vector , then no, the member funct... (by Catfish666)
Array Intialization :)
 
Here I have functions that initializes first 25 elements by squaring the index and the other 25 by multiplying 3 times the index. My assignment has instructed m...
[8 replies] Last: Of course you can, but it depends on what you actually need to achieve... (by keskiverto)
Looping a program
 
I'm working on a piece of code which will loop my entire program from a certain point within main: bool playAgain() { char yesOrNo; cout << "Do you wan...
[3 replies] Last: while(yesOrNo != 'y' || yesOrNo != 'n') { cout << "Must enter y... (by tom221b)
Printing prime numbers
 
I need to print the prime numbers from 1-1000, except instead of printing the number, i need it to print a 'P'. So, the prime numbers are all p's. whats wrong...
[4 replies] Last: http://www.cplusplus.com/forum/beginner/117306/ (by mutexe)
Makefile (using header files, main files, etc)
 
Hello all. So for our class we have just been doing codes within one script. Now we are using header files, along with two cpp files that we are supposed to u...
[4 replies] Last: You will pass an input file’s name on the command file. Use argv ... (by Catfish666)
Sorting words C++
 
Hello i have this quote Friendship is born at that moment when one person says to another: "What! You too? I thought that no one but myself . . . And I want t...
[14 replies] Last: Line 7: length() gives me a lenght of a word (by deividas717)
by gnasen
Dynamic array of classes
 
Hi Folks, I need a multidimensional array of a class which size and type is unknown at the beginning. I came up with the following idea: template <type...
[1 reply] : - What goes wrong? blub is not changed. - What is the proper way to... (by coder777)
Erasing characters from a string
 
I am currently trying to remove anything that is not a digit or the letter X. However, for some reason it's not working when I try to use the erase() command ...
[1 reply] : You're passing the string by value to the checkDigits function by va... (by MrHutch)
how to hide user input
 
I wrote this code that takes in menu items from a txt file and shows it to the user. Each item has a specific number, the user then inputs the number of their d...
[1 reply] : The getch() on line 104 only gets the new line left from line 101. In... (by coder777)
simple function for making something in a .txt file ascending order
 
Hey I am making a program where it takes an occupation and their salary and calculating the average and the median of all the salaries from said occupation in a...
[4 replies] Last: here is a tentative function: int Lrg_Pos(int st_pos, int l_pos) { ... (by nutty craze)
Pancake Glutton
 
Hi i have a question about my code here. its suppose to be the solution to Pancake Glutton Write a program that asks the user to enter the number of panca...
[no replies]
Using a Word as a Variable Value
 
I am very new to c++ programming, and I have what I assume is a very basic issue, but I can't seem to find a direct answer. I have a profect for school coming u...
[3 replies] Last: Here is a working example that shows the user a list of available comp... (by cspctec)
Text file to a 2D array
 
Hi guys, I was wondering if someone could point me to the right direction with this problem. I'm suppose to read the numbers.txt file into a 2D array and output...
[no replies]
help
 
this programm out put is * ** *** this is triangle starting from left..with vari...
[1 reply] : First of all, it is incredibly difficult to understand what you want. ... (by cspctec)
Array Problem
 
I am having to make a matching game for a program. I am almost finished but running into a problem. I don't know how to make the 2nd array take an integer along...
[no replies]
I need help with pointers
 
I keep getting a runtime error :( can anyone help me with pointer variables? im tring to seperate my main into functions and pass the information usuing pointer...
[no replies]
Printing blocks of asterisks as text
 
I am trying to print out blocks of text using asterisks. I know how to do that but when it prints out it is all done vertically. I would like for it to print ou...
[1 reply] : Yeah, printing it out horizontally isn't quite as easy as printing it ... (by long double main)
Generate a polynomial program.
 
Can you please give me some idea on how to do this problem. The math department has asked us to write a program that will allow the user to enter in inf...
[no replies]
November 2013 Pages: 1... 2223242526... 80
  Archived months: [oct2013] [dec2013]

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