Beginners - April 2015 (Page 45)

by mf95
Need help finding a word in a file!!
 
I am having trouble searching an file for a specific name. Every time I run the program it says the word is not found however I know it is in the file. Can you ...
[1 reply] : This works although it may not be what you want, it does work. I recom... (by SamuelAdams)
continue Statement
 
The code acts differently to the way I suspected it to. It prints Test-2 though I don't know why, Why does this loop end? Should it keep executing, but som...
[4 replies] Last: I'm going to give myself another 300 facepalms. Thanks lads. (by closed account EwCjE3v7)
how can i put an array in a class the right way?
 
I am struggling on how to put an array in a class and call the array in main .I have tried but i get this error : invalid conversion from 'int' to 'int*' [-f...
[1 reply] : See if this video helps you - https://www.youtube.com/watch?v=VnZbghMh... (by TarikNeaj)
have user print provide word
 
i have this code so far and all i need to do next is have the user enter a word and then print out all its adjacent words from the words.txt. Meaning if user en...
[1 reply] : How is findMostChangeable supposed to help you find the adjacent wor... (by fg109)
How to get integer size/position?
 
Pretty simple question: In strings you can do variable.size() or variable.at(number),so how can you do the same for integers or any variable type other than ...
[8 replies] Last: Thx, it works just I wanted now. If you want to, I could paste the ent... (by kik4444)
by Kman
Quick "expected an expression" fix.
 
Just a simple question. I have this program that's giving me the above error at the end of some of my function calls. Here's the prototype of the function I'...
[6 replies] Last: Alright, thanks for the help! (by Kman)
FLTK. Stroustup's striped closed polyline exercise.
 
Hi! I study c++ by myself using Stroustrup's manual. Problem that I faced is: when I defined new object of Striped_closed_polyline in main(), Striped_circle o...
[1 reply] : up (by alexander fedorov)
Looking for help
 
so I have a program I'm trying to write that essentially simulates a store. I have to read code in from a file, then give an option to purchase item, return ite...
[1 reply] : https://www.youtube.com/watch?v=tvC1WCdV1XU&list=PLAE85DE8440AA6B83&ab... (by TarikNeaj)
by mf95
Integers into an int array ?!?
 
How do I get a file of numbers separated by spaces into an array of integers?? Assuming that there will be no more than 100 integers entered. This is the code...
[3 replies] Last: Maybe you can do something like... int integerCounter = 0; while(in... (by TarikNeaj)
by JoeJoe
basic cin issue.
 
Hello, I'm playing with classes and constructors and I'm running into a cin issue. My current program works as long as I stay with in the specified amount of ch...
[4 replies] Last: When you do array[ index ] you are saying "access the element in the... (by ne555)
by lew13
Recursive Function help/ Vector (1,2)
 
I am trying to write a small program that takes a string of positive integers and counts the to the end of the string using the most cost efficient route. It ca...
[32 replies] Last: I got it man it was just in my cout statement. Unfortunately I didn't ... (by lew13)
Unicode rendering (Updated)
 
I posted my question couple days ago while i was still working on my code. I will restate my question so it would be clear for everyone. Goal: print All of the...
[no replies]
by Vik70r
Problem with lists, eliminating duplicates
 
Hello guys! I need a bit of an advice with lists. Basically, i generated a list and created a function that should delete any duplicate information. #inclu...
[no replies]
Vector in class
 
Can anybody help me straighten this code out? I really need it to work and I am stuck. How can I write it so it works? class Bank { public: Bank(int...
[11 replies] Last: Your inclusion guards are in odd place. That might explain why class ... (by keskiverto)
I'm having difficulty wrapping my head around loop style statements. Resolved with multiple conditions for do while statement.
 
I'm working on a simple arithmetic program in VS 2013 and have most of it done. I'm just having issues understanding loop statements. I want the final line to b...
[6 replies] Last: I did do that. I was just posting the solution to my problem in case o... (by Cyberpunk Eevee)
Parsing a file for game initialisation
 
Hello people, I want to make a class that reads a text file that looks like this: <ClassName StartPosition="20,20" Color="255,255,0" Speed="100" /> <Class...
[2 replies] Last: I really want to use this kind of structure without using any special ... (by doodlebee)
Restart console application command
 
Hi, i need a way to restart my console application. I don't think a do-while loop can help me, because the restart should happen in the middle of the code, i...
[2 replies] Last: Thank you very much! (by Bene7553)
by aero36
Practice
 
Hello, I am starting C++ and was wondering if anyone knew of homework-esque problems that I can use to solidify concepts through problem solving. Preferably wit...
[2 replies] Last: Awesome thanks! (by aero36)
by oseri
For loop control variable name conflicts ?
 
I've got a function that has a parameter with the same name as a for loop control variable : void fun(const int& i = 0) { std::cout << "&i: " << &i << "\n"...
[2 replies] Last: It's legal. When multiple instances of a name are in scope, the inner-... (by dhayden)
Need some help (1,2)
 
So this is a program I wrote about a week ago and just today I decided to make it loop, but there's one problem with it that I don't understand - on the first g...
[25 replies] Last: It seemingly works that way. If you enter "yes", it doesn't do anythin... (by kik4444)
April 2015 Pages: 1... 4344454647... 52
  Archived months: [mar2015] [may2015]

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