Beginners - April 2012 (Page 43)

Xcode Input File Problem
 
Helloooo C++ forum! I am new to these forums and new to programming. I only have a single semesters worth of C++ programming under my belt so I don't know t...
[6 replies] Last: i had the same problem. i use xcode also and all you need to do it go ... (by ui uiho)
Dice Program
 
My objective in this program was to write a function that rolls a pair of dice until the sum of the numbers rolled is a specific number(given by the user). It i...
[2 replies] Last: #include <iostream> #include <cstdlib> #include <ctime> using namesp... (by ui uiho)
Dynamic Memory Allocation.
 
I am a practicing some Dynamic Memory Allocation for my final exam. I was trying something and I ran across a problem. Prof said, you have to always have a dele...
[4 replies] Last: This is an error: delete pointer_1; cin >> pointer_1; you're acces... (by Cubbi)
only one variable prints
 
I was playing around with classes and functions and im not sure why this is incorrect. The output is 5 when their should also be a 6. #include "stdafx.h" #...
[2 replies] Last: can i suggest structs if you are going to be making similar data struc... (by ui uiho)
Errors with infiling and outfiling
 
The program is an ATM machine that you pretty much just make deposits, withdraw, and check your balance. It is a school project. Here is the complete code ...
[8 replies] Last: that has a compiler with it... it has the Apple LLVM compiler... and i... (by ui uiho)
function to update count in max heap, seg fault
 
Can anyone figure out why this is giving me a segmentation fault whenever it is ran? This is for use in a max heap template <class T> void Heap<T>::countUp(...
[2 replies] Last: long double main.. nope, sorry, didn't work :( (by Smooth23)
system("title variable"); ?
 
How would I set the title of the window to a variable (string) ?
[1 reply] : Since you seem to be using Windows... #include <string> #include ... (by long double main)
priority queue in C++
 
I learn today in class that in order to dequeue from the priority queue, i will need to scan the max and take it out from the queue. My professor said that it m...
[2 replies] Last: @vlad: thanks for replying me. the reason I bring my question up here ... (by mrdeath9x)
Random global variable
 
Im trying to write a text based survival game. I want to have all the resources start at a random number. Where do i define the variables? right now it is defin...
[4 replies] Last: I get an error saying situation1 cannot be re declared (by windowspsycho)
the array ends the second loop.
 
I put this function in a loop and the first run throught the program works fine. On the second time throught the loop the "fin.fail()" fails and the program en...
[6 replies] Last: Awsome, that worked. What does that do? Any reason to put the fout.c... (by drhingle)
by cokane
Program runs but does not output desired results
 
I need to get this program to ignore even numbers and only add positive ODD numbers. The loop is designed to end when the user inputs "-1" and this feature work...
[4 replies] Last: So with that in mind.... if you are doing if (in % 2 == 0), what are y... (by cokane)
Random number generator
 
I'm making a dice game that generates random numbers from a dice. I'm reading from my book and I see " die1 = rand() % 6 + 1; ", I'm confused about what exactly...
[4 replies] Last: #include <iostream> #include <cstdlib> #include <ctime> using namespac... (by sean903)
Binary Search Tree
 
Hello! I'm trying to make a Binary Search Tree with strings are the information stored into the tree. I don't think I'm using the strings right because all th...
[no replies]
Help with ifstream / inFile please :)
 
Okay, first of all, I would like to thank anyone for actually opening my topic thread! :) Now, on to the important matters... I am completely stuck on this ...
[no replies]
Easy way to test if input is the correct variable type?
 
So I am using the cin command to have the user get a number value and place it into an int type variable. The problem is that if the user enters an 'a' for exa...
[7 replies] Last: clear() clears the error flag. However, the data that caused the error... (by LB)
Code Randomly Crashes
 
I have a code that is randomly crashing on me without any explanations. I'm not sure what is going on. When I run the code, it says that the .exe file has stopp...
[8 replies] Last: Err, but you have to make sure you delete everything. That would me... (by AliMoradi)
by Obdz
Homework Quistion
 
Hello everyone. I'm studying C++ as a required course for my program which is sustainable and renewable energy engineering. So our Dr gave us this homework and ...
[1 reply] : You do not read all characters in one sentence, you read each characte... (by Shinigami)
stupidest error ever
 
the whole program works but when i tried to put the last else statement in on line 113 there is a error and i know its the stupidest little syntax error and i...
[4 replies] Last: What do you mean, "it won't stop looping"? The menu pops up AFTER you... (by long double main)
by ty98
Array problem!
 
I want to make an array to increase and decrease. From 0 to 500 and back. And i don't know how... Can you help?
[5 replies] Last: Thanks. (by ty98)
Array of chars - problem
 
Hello everyone! I want to make a program that reads a few names and stores them in an array of char-pointers. What I have until now: #include<iostream> ...
[2 replies] Last: Respectfully thank you, hamsterman. (by CosminNTG)
April 2012 Pages: 1... 4142434445... 66
  Archived months: [mar2012] [may2012]

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