Beginners - April 2015 (Page 36)

Flags - Good or Bad?
Is the use of boolean flags to determine the flow of a program an acceptable technique, or is it generally deemed 'hackey' in nature with the propensity to lead...
Apr 10, 2015 at 11:52am
[4 replies] Last: Okay, thanks guys. I guess the answer is that it depends on how you us... (by Bogeyman)
C program sort array then get user command
Hi all, I have a c programming question I am stuck on. The question first asks to write a program that takes multiple values and stores the numbers in an array...
Apr 10, 2015 at 9:58am
[no replies]
by SCB3
Can anyone go through my code? (regarding arrays) (1,2)
So, I'm pretty much done making my Minesweeper game project and just wanna go through a few things the last 2 things I gotta do is a leaderboard, and set it s...
Apr 10, 2015 at 8:13am
[22 replies] Last: ^^sorry, sometimes I was away whilst I replied. Anyway, complied it ... (by SCB3)
do-while loop not looping
The code runs fine in regard to the functions and calculations. However, it doesn't seem to be doing the 'while' part of the loop which asks the user if they wi...
Apr 10, 2015 at 7:38am
[5 replies] Last: That did work, but it's not the only problem. Remove line 159 and mov... (by coder777)
by prhray
Char string within a structure not working
I defined a character string in a structure, but it does not work properly. I get the following error message for line 6: error: expected ':', ',', ';', '}' or...
Apr 10, 2015 at 7:33am
[1 reply] : In C you can't give values to the members in the struct definition lik... (by Peter87)
Create a program that computes all prime numbers less than max number
I have to create a program that computes all prime numbers less than the max number by storing them in an array and then printing them 10 primes per row. T...
Apr 10, 2015 at 7:23am
[no replies]
by conlan
Ohm's Law Program with data sets
Hi all I am new to c++ as I am taking a entry level class. We have to write a program using ohm's law. The program uses arrays (possibly pointers) and has to us...
Apr 10, 2015 at 12:32am
[7 replies] Last: Here is what I have so far. I cannot seem to figure out how to limit t... (by conlan)
unordered_set hash specialization
Hello! I am specializing the hash function of std::unordered_set template class, but I want to use its size() as part of the function. How could I do this? ...
Apr 9, 2015 at 11:29pm
[9 replies] Last: That is helpful, Thanks! I will use std::hash. (by closed account oGhfSL3A)
'Date structure' question
Hi. I am studying 'Data and structure'. In this example I understood the structure of " printmovie ( movies_t movie(which can be mind and yours) )" But I wonde...
Apr 9, 2015 at 10:23pm
[2 replies] Last: Thank you now it is much clear to me. I like the wacky way you explain... (by Flampard)
by a0123
Increment/Decrement
Hi, i would like to now why is the returned value 36 and not 37? Thanks for the answers :D int main () { int a = 14; int r = 10; r=(a++) + (--a) + r; ...
Apr 9, 2015 at 10:17pm
[2 replies] Last: Thanks (by a0123)
Compiler Error
I'm doing a school assignment and I'm having a small error issue. I have too CPP files and two heads #include "sl_list.h" #include <iostream> #include...
Apr 9, 2015 at 10:15pm
[3 replies] Last: So how do I move through all the units in the node in ToString then? (by ManlyMartin)
How many prime numbers between 1 - N
I'm new to the whole programming stuff. If anyone can help me on this that would be awesome. I have to create a program that will tell me how many primes numbe...
Apr 9, 2015 at 8:39pm
[4 replies] Last: I have to 1. Create a void function to get the user input 2. Create a... (by steph2015)
string
what is the problem with this code???i want 2 find gow many space int my every name?? #include<iostream> #include<string> using namespace std; int main(){ ...
Apr 9, 2015 at 8:15pm
[6 replies] Last: Sorry, but I don't have an obligation to check your code, nor anything... (by TarikNeaj)
by sha92
Breaking the program!
Hello, I need to find the largest positive integer, that I can get from this program. That means this program should break when it displays the largest posit...
Apr 9, 2015 at 6:35pm
[2 replies] Last: start at MAX_INT and work your way back? Edit: or perhaps UINT_MAX? (by Texan40)
Using a structure inside another structure
I am trying to create a program that uses two structures, one for the date and one to list events. The prototype will only track 5 events. I made the structur...
Apr 9, 2015 at 5:59pm
[5 replies] Last: Thanks FG, I forgot to change that. I am using structures since I hav... (by JMac618)
by Aideux
rand() function only generating 42
I'm trying to create a simple game in C++ that generates a random number and, when the user guesses incorrectly, tells the user whether they need to guess highe...
Apr 9, 2015 at 5:21pm
[4 replies] Last: Awesome, that worked! Thank you so much. (by Aideux)
by Nillen
My loop doesn't increment
With this little code, I have 2 issues, both surrounding the loop of mine. I have a list of students' ages, and I want to input a value and loop all students ...
Apr 9, 2015 at 5:06pm
[4 replies] Last: Oh my god... Thanks again... I guess I was too used to using the assi... (by Nillen)
If statememt true, how to stop program without restarting?
Its a simple text based game. Program runs fine. but I want it so when my if statement is true, it stops the program but doesn't restart it. cout << "Whic...
Apr 9, 2015 at 4:26pm
[8 replies] Last: Thanks it is getting hard to keep starting over over. Ill try that ou... (by daemonhall)
c++ calendar
I am having trouble with coming up with source code for this :( Speci fications: 1. Calendar is menu-driven. The user chooses his desired activities by select...
Apr 9, 2015 at 4:09pm
[1 reply] : http://lmgtfy.com/?q=c%2B%2B+calendar (by TarikNeaj)
Cannot include 'type_traits'
Hi Guys!. I'm using VS 2008. I'm getting a build error saying fatal error C1083: Cannot open include file: 'type_traits': No such file or directory Som...
Apr 9, 2015 at 3:48pm
[2 replies] Last: type_traits is a C++11 library. (by fg109)
April 2015 Pages: 1... 3435363738... 52
  Archived months: [mar2015] [may2015]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.