Beginners - November 2012 (Page 44)

The number of repeated characters in a string
 
Hi It's a program for ''The number of repeated characters in a string'' I wrote this program but It doesn't compile .Where Is problem? #include <iostream> ...
[8 replies] Last: There seems to be a bit of confusion in the structure of the program. ... (by Chervil)
Different classes in same vector
 
Hello everyone! I am currently working on a very primitive game (Which I'm making mainly to improve my understanding of C++). I've recently ran into probl...
[7 replies] Last: wow, thanks. This is infinitely helpful! Didn't even know std::map was... (by Molecular)
confused about collision detection in SDL, i dont understand this snippit of lazt foos tutorial
 
been learning the lazy foos tutorials, they dont explain so much but theyre better than the sdl documentation, here im stck trying to understand the tut on coli...
[5 replies] Last: I GET IT NOW :D thanks for going to the trouble of explaining a t... (by devonrevenge)
'uninitialized local variable x'...? please help
 
Hi, I don't see how 'x' is uninitialized here, can someone explain please? (i'm only just learning) #include <iostream> #include <string> using namespace ...
[2 replies] Last: Thanks :) (by Katieeee)
displaying info of object with iterator
 
How do i get the iterator to display only for example the string name of an object ? void Shop::display(Character& C) { list <Item> temp = C.bag; l...
[1 reply] : You have to overload the << operator to achieve that: http://www.learn... (by Fransje)
The boolean seems to be not following my if statement
 
i was working on sieve of eratosthenes, i set the bool to TRUE if its a possible prime the false if its not. i really wanted to know why it seems not to be foll...
[2 replies] Last: #include <iostream.h> int main() { int limit, num=2, ctr; cout << "... (by jullianvalondo)
by bjt223
Struct, Pointer, Linked List
 
Hi guys, I"m trying to write a program that allow a user to track their DVDs. Use an input file which include these attribute for each movies. Basically, the...
[3 replies] Last: I already tried that. Ok, what did the debugger report the value o... (by TheIdeasMan)
Int to Decimals
 
Hey everybody. I can't seem to find a way to get my array to display decimal places instead of the int value hits is int atbats is int walks is int and b...
[no replies]
Very simple question!
 
How do I upload a picture of my program, opposed to copy and pasting?
[1 reply] : You could always press the print screen button, paste into paint, save... (by Raioner)
Why does this cause a program freeze?
 
void calcbatavg() { for(int index=0;index<MAXPLAYER;index++) { batavgs =((hits )/(atbats -walks )); } } Ever since I put this piece of the puzzle in p...
[1 reply] : This code looks fine. Have you tried debugging? (by Zhuge)
by Hotice
Vector emptying itself...
 
Somehow a vector, operands, is emptying itself, yet I make no mention of the operands.erase() ! Here is main function: int main() { int n = 0; string...
[4 replies] Last: I knew I should have kept the second loop for that one! Thanks, man! P... (by Hotice)
by zkl
Explain my output
 
HI, this is my code, #include<iostream> #include<iomanip> #include<cmath> using namespace std; int main(){ double x,y; int quotient; char choi...
[2 replies] Last: quotient is declared as an integer. It should be a double as well sinc... (by Raezzor)
Using 2 Arrays in a fuction
 
Hi guys! I am having some trouble understanding how to define a function that can use 2 arrays. I apologize in advance for all the code. #include <iostr...
[4 replies] Last: Like Hekri said, vectors are one storage option that can change size a... (by Raezzor)
Printf Problem.
 
The code is below. The problem is to interview a no. of people about their foot size and then print out how many people have xx foot size and how many people ou...
[1 reply] : The main problem I have with you r code is the mixing of C & C++. I s... (by TheIdeasMan)
Average of values and same values
 
The instructions are to find the region with the lowest accidents.. my issue is what if there are entries with the same value. How do I get it to tell me there...
[no replies]
problem with recursive descent parser
 
I am writing a code in c++ to do a recursive descent parser/evaluation for int's for a grammar. I will say right now yes this is homework. I have made a lot of ...
[no replies]
.txt array of structs
 
I have a project where I am supposed to make an array of structs with a text file. We have to ask the person to enter a text file so it is supposed to work for ...
[3 replies] Last: and I have no idea how to make it skip the first line of data so that ... (by green7n)
by dusty
need help with error - cout is ambiguous
 
I am at a loss as to what to do, each cout has a red line underneath it and says that it is ambiguous and the debug goes haywire when I attempted to run it. Is...
[2 replies] Last: Thanks. That did it. (by dusty)
Classes: Understanding them
 
I am not new to C++, but I have a hard time understanding classes. Yes, I know how they work, I know how they function, and how to use them. But what are best...
[9 replies] Last: I will get more confortable with data structures before moving onto cl... (by IWishIKnew)
help with my assignment
 
hello again! i want to write a program that gets a number (int) from the user and brings back the summary of digits that are in the number. for expamle: if th...
[3 replies] Last: You are using functions but don't know what arrays are? That seems kin... (by Raezzor)
November 2012 Pages: 1... 4243444546... 75
  Archived months: [oct2012] [dec2012]

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