Beginners - May 2015 (Page 32)

by wrymn
Accessing Static variable - link problem
 
I have 3 files (.h and .cpp) MainGame.h MyFile1.h <- includes MyClass1 MyFile2.h MainGame.h contains public static vector of <MyClass1>, which is located in My...
[2 replies] Last: If you want to use a resource (in this case a vector of MyClass1) acro... (by Texan40)
Is calendar date valid
 
Is this code the right way to tell if the data is valid? It tried to take into account long years and short years which makes February 28 or 29 days long. ...
[3 replies] Last: A month number must always be in the range [1,12]. If it is not, then ... (by Duthomhas)
recursion issue.
 
hi guys, i have some problems regarding to recursion and pass by reference, can someone explain how to apply these things on my current code?(it can apply at le...
[9 replies] Last: To understand recursion, you must first understand recursion: //ret... (by IWishIKnew)
ProgressBar value label
 
Hello i wanted to make a % thing from the progress bar like 1%,2% etc. but i don't now why so i used this code: This->Label->Text = progressBar->Value &...
[8 replies] Last: Yeah i just wanted to now how to change things when it's on 25% and th... (by vaiandrept4)
Segmentation Fault Reading In .txt File
 
I am having an issue with a segmentation fault and I am pretty sure it occurs when I attempt to read in the .txt file. It is a family large file and I'm not sur...
[3 replies] Last: @dafontem Try adding cout << "test1\n" after line 32 and cout <<... (by fg109)
Copying form one array to the other
 
Write your question here. I need assistance in writing a statement(s) for the following instances 1.declare an array of 50 elements of type int called alph...
[6 replies] Last: for(int col = 0; col < 10; col++) for(int row = 0; row < 5; row++)... (by Texan40)
HW
 
Can someone explain what Part C wants me to do?Homework 10 The present homework is concerned with the use of pointers in computing the equivalent resistance to...
[1 reply] : iirc void passing(double *resistors, int size){ //TODO: output the... (by ne555)
by mrdemo
Having trouble implementing a search function
 
So I'm writing a code for an introduction to programming with C++ course, and I can get the basis of the code written. However, I'm told to "implement a functi...
[1 reply] : Probably. You could start at the beginning of your nums array and che... (by koothkeeper)
Having trouble removing the last item in a singly linkedlist
 
Hello, I have implemented a simple method that removes a number via search. I got it working to the point that it deletes any node from the head till before the...
[2 replies] Last: Keeping track of the tail can help in some situations, but here the ma... (by andywestken)
Help with some if statements
 
I'm new to C++ and doing a drill from the book Programming Principles and Practice using C++. I'm really confused why these if statements aren't working, the fi...
[9 replies] Last: Yes that works as well as it worked when I used my #include "../../.... (by EatMyTracers)
Adding a string to an array's index
 
I'm currently trying to initialize a string array, and then trying to put the "*" inside the 0th index of the array. Here is my code: #include <iostream> ...
[2 replies] Last: But let's say that I don't have a "*" at every index. In the first ite... (by strayyamato)
Small fixes needed.
 
Hello. I had my final exam today, and decided to write some more practice files so as to stay ready for the next semester. This program has some minor errors I ...
[1 reply] : #include <fstream> #include <iostream> using namespace std; int main... (by SamuelAdams)
Run Time Error in Beginners pig latin HELP
 
When I try run my program it says "this application has requested the Runtime to terminate in an unusual way" I am to make a simple Piglatin translation pro...
[1 reply] : Is there a reason you start out with 1000000 empty strings in your vec... (by cire)
by Sh0es
bad_alloc on new
 
I'm getting a bad_alloc error in this section of my code. int s = l - f; int half = s/2; int ind = 0; string* fst = new string (); string* lst = new...
[2 replies] Last: After inspecting the algorithm in question in debug, I eventually came... (by Sh0es)
When using a copy constructor, why do we set the values to 0 before we copy them?
 
My teacher deducted points for my copy constructor. This was what I did and what he wanted. // THIS IS WHAT I DID template <class T> Set<T>::Set(c...
[3 replies] Last: Thank you. These are excellent responses. (by keanedawg)
Program getting hung up on For Loop
 
Hello, this program is from Principles and Practice Using C++ 2nd Ed. by BS on page 123. The program is supposed to accept a list of space-separated words and ...
[3 replies] Last: Huh... I wonder why they'd tell you to code it like that? Ah, I didn'... (by closed account 2LzbRXSz)
ATM Project Help Walk through?
 
okay so I am redoing this project as I need to use a header file with a main and source cpp. I have not much so far and am a horrible coder. I would like ste...
[no replies]
Help, heritage, polymorphism or parametric
 
Well, i'm a beginner in c++, my teacher told us to make a class node and other class dipole, but there's a error or something, i don't know And in the consol...
[1 reply] : For future reference, please post the entire error message. Your prob... (by firedraco)
by lsang
PLEASE KINDLY HELP! AM SO CONFUSED (1,2)
 
Write your question here. hi friends, please I need your help on how to write this program. am new here and I don't know where to start from. here is the ...
[29 replies] Last: finally, I got it right. I am grateful to you anup30 and fg109. you gu... (by lsang)
ATM machine is not exiting Due thursday
 
So my project is to include 2 accounts checking and savings that both start at 1000 and can have funds transfer between accounts, funds be withdrawn, and deposi...
[1 reply] : Double-Posted: http://www.cplusplus.com/forum/general/164313/ (by cnoeval)
May 2015 Pages: 1... 3031323334... 40
  Archived months: [apr2015] [jun2015]

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