Beginners - February 2015 (Page 32)

by camk16
Boolean Statements (1,2)
 
Missed the lecture on boolean statements, can someone help me out with this: Write an if-else statement to set a boolean flag bIsPositive to true if a gi...
[20 replies] Last: There's a thread at the top of this forum titled "Console Closing Down... (by LB)
Problem getting information from a structure and other problems
 
Essentially i have created a program that read information from a file. However i am having problems trying to access that information. I can't figure out a way...
[2 replies] Last: Thank you so much. That helped me a lot i'm still working on the code.... (by noob plusplus)
by Nanyo
sign up, login program
 
Hello, I am trying to figure out why my code is not working. It is a simple login and signup program. My problem is that the "while" function on Line: 66 does n...
[2 replies] Last: n Line: 66 does not work and gives me an error when I run it. The ... (by giblit)
by gsm2k
cin.get() Not working as pause. Do_while loop
 
Hi! Pardon my n00bness =) Im working on a school assignment, and have been trying to avoid system("pause") as I have come a cross a lot of hate for system("any...
[1 reply] : Let's say you input variables like this: int x; std::cin >> x; There's... (by LB)
Reading int values from an array and determining what range they fall between
 
I'm having some trouble with my programming exercise. I have to read integers from a text file and store them in an array. Then determine the number of integers...
[1 reply] : I don't understand how you learned about file I/O before learning abou... (by LB)
Iterating through the array
 
Hi, I need help with my for loop. I'm trying to read some value from the file. #include <iostream> #include <iomanip> #include<fstream> #include <string>...
[no replies]
Programming Error?
 
When I try to run this code (see below), I get 4 lines of: -1.#IND -1.#IND -1.#IND -1.#IND I am using VS Express 2013, but when my friend runs it in his ...
[2 replies] Last: I see the 0 that you are referring too, but I can't change that becaus... (by maximus87)
Please help with class design.
 
So I want to make a classic dungeon crawler in the console. Would it be bad to have each room a child class of a parent class? There is going to be a lot of roo...
[2 replies] Last: Separate your code and your data. The contents and behavior of each r... (by Disch)
for loop iterating around array to read from a file in c++
 
Hello, I'm in my second semester of computer science. I've been trying to finish this project for the past 5 days but I need help to figure out some part. Woul...
[no replies]
writing files to a file
 
Ok, Im trying to simply write one file to another and for some reason Im only getting a blank file. Is it the variables that Im using? or some operation I forgo...
[2 replies] Last: See I knew that it was something small that I missed. lol Thanks!! (by specter113)
Date program
 
Can someone help me write a program that will tell the day of week, month, date, year and whether it is a leap year or not? It should look like this.. Ex. En...
[1 reply] : Please note, that this is not a homework site. We won't do your homewo... (by keskiverto)
by HelenI
How?
 
how can i get the top and the second item of a stack? for example i have 12,34,6 and i want the first two 12,34 and print them.
[1 reply] : That depends on how your stack was implemented. With a std::stack th... (by jlb)
Nested Getline in text file parser
 
I am trying to do a .txt file parser for a game project. I want the parser to look through each line in the text file and if that line contains a comma signs di...
[3 replies] Last: Just because you don't get errors doesn't mean your program is correct... (by jlb)
by Torm04
Outputting the reversal of a string?
 
Hello, I am having trouble with a certain part of my assignment. I am supposed to take strings from a .txt file and reverse the the order and then output it. I ...
[5 replies] Last: @naraku9333 Nice, very nice! (by tipaye)
How is my code?
 
I'm a beginner C++ programmer, and attempting to step out of my comfort zone, this is my first time using map. This program is designed to parse string input an...
[7 replies] Last: Nope, no struct either. Try this template: #include <iostream> #includ... (by LB)
Functions and Arrays
 
Hello everyone! I come here desperate for some help/ tutoring on what to do. I feel so lost in my C++ class.. Here is the description of the assignment: Wr...
[1 reply] : http://www.cplusplus.com/forum/articles/20881/ (by DyavolskiMost)
How to detect
 
How we can detect before executing program, that loop would be infinite or not ? Thanks.
[3 replies] Last: infinite loops are not necessarily run-time errors. In fact, most usef... (by tipaye)
My program prints the address of the pointer rather than the value
 
I had it working correctly before I implemented the do while. I thought using delete to free up the space would work, but it doesn't for some reason. So my ques...
[2 replies] Last: Thanks man, your hint made realize the real crux of the problem. I act... (by imissopenlayups)
void pointer and cout
 
Hi all, I'm new to the forum and to C++. I'm studying pointer from the tutorial. But there is an unexpected behavior I can't understand. The following code work...
[6 replies] Last: There's no special knowledge of the inner workings of the compiler nee... (by MikeyBoy)
by Kernul
Number in base ten to any base
 
Given as input a number in base ten, convert it to any other base. Example: INPUT Number = 14 Base = 2 OUTPUT 1110 This is the code I wrote: #include <iostr...
[2 replies] Last: Yeah, I just realized that I needed an array. I did it! Thanks! (by Kernul)
February 2015 Pages: 1... 3031323334... 52
  Archived months: [jan2015] [mar2015]

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