Beginners - May 2014 (Page 24)

iterator and function argument
 
I am looking at the following exercise: "Write a function that takes a pair of iterators to a vector<int> and an int value. Look for that value in the range an...
[5 replies] Last: 1) you have two return types declared. As you want to return bool, rem... (by MiiNiPaa)
SimpleAddition Program
 
but i guess its not that simple like the title says :D ok .. im doing a excercize but im stuck here .. the excersize sounds like this: -You are given N coins ...
[14 replies] Last: Every time someone replies to a thread it is moved (or "bumped") to th... (by Duthomhas)
by m00n
question about using vectors
 
Hi! i'm pretty new at c++ and we've recently been learning about reading text files. So far we have just used getline and storing in a array/printing it out usi...
[3 replies] Last: Thank you :) (by m00n)
by SVcpp
I'm not understanding files!
 
Hello all, thanks for over looking my code. I'm very new to programming and I really want to understand files. My knowledge of them is just the 40 pages of ...
[1 reply] : That's easy. Just because all the words except "Processing Data" was ... (by amchinese)
HELP PLZ!!
 
I'm having trouble of my code outputing Found. What the code has to do is that it is going to read the InFile than going to say if it is found or not. It keeps ...
[10 replies] Last: I dont see any logic in passing isFound as a parameter to the functio... (by Codermik)
how to ask for input again if input validation failed
 
I'm writing a simple program where the user enters the month (1-12) and the program displays how many days are in the month. How do I make it so if it's not a v...
[2 replies] Last: Why you use double for mounth, it's betret int (integer), because moun... (by powerbg)
Undeclared identifier
 
my .cpp detect there are undefined identifier.. is there anything wrong on my header file? /*testing2.h*/ //class and method implement class Nut { p...
[8 replies] Last: [quote=coder777]Furthermore: You haven't defined functions like GetCar... (by MiiNiPaa)
Spell Check.
 
So this program has to do the following: - Enter a word - Open a predetermined text file (it is assumed that it's always there, in this case it's dict.txt)...
[1 reply] : word == "exit" ← You cannot compare c-strings like that. Use strcm... (by MiiNiPaa)
can someone run these codes for me and put the output here please? thanks!!
 
#include <iostream> using namespace std; void showVar(); // Function prototype int main() { for (int count = 0; count < 10; count++) showVar(); return 0; ...
[3 replies] Last: Oh... Don't do multiple posts of the same question. (by Lachlan Easton)
run time error while destroying a vector
 
The following code means to destroy a vector defined with unique_ptr to objects. Oddly enough it works smoothly on the computer of a friend, but abends on mine....
[6 replies] Last: Thank you, I made the change you suggested. As well, I move to anoth... (by GironAntoine)
Binary search
 
i wan to search the array using binary sort, but i had the bubble sort to sort out the array before searching, but what i really want is to display the searched...
[4 replies] Last: got it fixed it, thx (by Eraphine Astrid)
HOW TO ITERATE OVER EACH ELEMENT? HELP PLEASe!
 
void insertHead(T value) = 0; { for (Node* next_pointer) if ( head!= NULL) { Node* curr = new Node (value, head); curr->next = head; ...
[2 replies] Last: void insertHead(T value) = 0; { Node* curr = NULL; //could u expla... (by claudilla)
recursive function
 
Can someone show how to do recursive function by hand not complier. thank
[7 replies] Last: lol. One question about String, when it say s2.replace (3,2 s1); i ... (by CodingisFun)
by Huppa
Logical Errors - Functions
 
I am attempting to write a program with modular structure that asks the user for two points on a line, calculates the slope of the line, and determines whether ...
[18 replies] Last: It really depends on what you like and your operating system. Codebloc... (by CodeGoggles)
Help Removing Duplicates
 
Hey Guys, I saw examples on the site for removing duplicates within an Array but when I use my code I can't get my inner-for-loop to check the last value in the...
[2 replies] Last: ahh figured it out the correct is as follows: A buddy helped me out ... (by lordnovas)
Simple Console Game Slight Error
 
The following code compiles fine, well at least on my compiler that I know of :P I seem to have a small issue with moving the sprite. The only part that I can...
[4 replies] Last: Oh ok, very helpful information especially for the collision part (: (by BLooDiEMuRDA)
Help for map<std::string, MyObj*>
 
Hello, first of all sorry for my english, I'm french :). I'm trying to do a little game (with sfml) and I use the container std::map for manage my object. I'm...
[3 replies] Last: Do you really need the key? Why not just use a std::vector<Block>? (by naraku9333)
by rayna
Need help with input and output using arrays
 
I am trying to take data from one file, save it into an array and output it into another file. The problem I am having is the output displays some garbage 6 tim...
[8 replies] Last: #include <iostream> #include <fstream> using namespace std; int mai... (by rayna)
arrays, file and function...help please.
 
Write a function swap that accepts an integer array and two integers pos1, pos2, representing two locations in the array. the function should swap the contents ...
[1 reply] : If you make an attempt at solving them and post your code, we can help... (by freddy92)
I need help,urgent please.
 
I have to do a project of C++, I am a student, haven't any good knowledge of this language.Project can be of any type like Visa card machine software to digital...
[6 replies] Last: Well the best way to get help is to at least try yourself then someon... (by Codermik)
May 2014 Pages: 1... 2223242526... 55
  Archived months: [apr2014] [jun2014]

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