Beginners - March 2014 (Page 47)

by Arcie
If statement with multiple criteria
 
I am not sure how to ask this. I have been coding since my first post on this forum at 2, working on some school work and some fun work. This is a school projec...
[5 replies] Last: Ok, that's weird... I swear that code wasn't working yesterday! Just t... (by Arcie)
Finding average Temperatures w/ Vectors
 
I've been working on this project for a while and cannot figure out what to do next. I'm trying to ask the user to put their values into a vector called temps u...
[4 replies] Last: Add: if (temps.size() == 0) return 0.0; somewhere to avoid divide by... (by ShodanHo)
Compiler and tutorials
 
I have some previous knowledge of c++ but i have had a long break about 2 years but now i wanna start up again but i'm in doubt how do i get the newest compiler...
[5 replies] Last: It does matter, download the latest release of codeblocks or mingw and... (by nvrmnd)
implementation of a multithreaded version of mergesort.
 
Hello, Im working on making a multithreaded version of mergesort. [The // Perform "cleanup" work by merging remaining sections. part] I have the normal ...
[no replies]
by n30n
c++ class constructor to create date and time
 
Write your question here. im trying to create two classes: a Date class and a Time class. The Date class has to have three private data members: day, month...
[2 replies] Last: And you didn't provide 'Time class' code. (by ak16)
by lomber
Clarification on numbering for header files?
 
Hi, I have 2 examples here that demonstrate numbering in header files, Ex1 and Ex2. My question, which is the correct way to save the code for a header file, de...
[1 reply] : Do not include the line numbers. Ex2 is the correct one. (by kevinkjt2000)
by tommyo
c++ string class concantenate
 
I can't figure out how to write this ConCatenation member function for my Mystring class. I need it to ConCat Mystring s onto the tail end of another Mystring (...
[2 replies] Last: Your function is supposed to return a Mystring. Probably you want to a... (by ats15)
destructor in .h and .cpp file
 
I have 'expression must have pointer type' error so in CCC.h file I have public: // Constructor definition. As specified, it takes two argumen...
[1 reply] : I am assuming taxRate is of type double ? The delete keyword is o... (by kevinkjt2000)
Vector Iterator Not Dereferencable
 
I'm getting the error as stated in the title at line 80 when I call my binarySearch function. Any ideas why/how to fix? // BinarySearch.cpp // Cedar Wisema...
[2 replies] Last: A. In a vector, v , v.size() is never a valid index (line 17.) B. ... (by cire)
by stdeez
underflowError
 
Sorry for the simple question but for some reason I'm having a hard time finding a reference to show me exactly how to use this feature correctly. My book has ...
[7 replies] Last: It's part of exception handling. You can throw an error for later view... (by Volatile Pulse)
I need help with a couple things.
 
I have been struggling on this for a while now. First I am confused as to what the section of code phrase )) does. cout << char(phrase ...
[1 reply] : #1 int main() { string phrase; char encodeOrDecode; int i; ... (by Volatile Pulse)
Pascal triangle using recursion.
 
Hi! I have written this program for Pascal's Triangle using recursion but I m not sure whether it can be termed as 'Recursion' coz it still uses loops , I have ...
[2 replies] Last: Yes it gives the right output. Thanks! (by Manav Mnv)
by ccdare
difference between DBL_MAX_EXP & DBL_MAX_10_EXP
 
Is the non-10 version means in the binary format the digits of exponent can up to? Due to I find 2 xy 1024 approximately equal 10 xy 308.
[no replies]
by tommyo
c++ For Loop Error
 
I can't figure out why i keep getting an error on this class member function Error states "Control may reach end of non-void function". Error points to t...
[1 reply] : What happens if s.sval is equal to sval ? I recommend you use one re... (by jlb)
minimum values in an array
 
i need to find the minimum values in an array and print the indexs corresponding to the elements out. There are identical minimum values in a array,the size of...
[2 replies] Last: Sorting changes indices, so it seems inappropriate. std::min_element ... (by keskiverto)
by locolo
nest if-else - int but still accepting characters or enter
 
If I enter "a", its shows 500 instead "invalid data" or if I press enter, it keeps jumping lines why does it happens?? what is the right code?? if its wrong....
[4 replies] Last: Your welcome :) (by Codermik)
Pointers and Classes
 
I am doing homework for my Intro to C++ course, and I am a bit confused as to what I need to do in my function set_best_friend. I copied and pasted my class dec...
[3 replies] Last: Who has the vector, main() or every Person? Why would the instruction ... (by keskiverto)
Keep getting bad output
 
Hello all. I am writing a program and I keep getting the same values that I have in my default constructor even though I am using set functions to set the value...
[5 replies] Last: Yep - that's what I was hinting at! Glad you managed to find it, and ... (by MikeyBoy)
Using DirectInput to get Keyboard Input
 
I am having a bit of trouble getting keyboard input to work with a program I am making. I need the "W" key to move a sprite I have made to a specific position. ...
[1 reply] : Solved this, following along here: http://www.two-kings.de/tutorials/... (by jheard901)
by cozier
Could someone take a look to see if I made these arrays correctly?
 
We were given a starter program with the instructions below to write loops for an array. This is my final output and I wanted to see if someone could take a lo...
[9 replies] Last: data1 is the array of numbers we generated from the rand function. da... (by Codermik)
March 2014 Pages: 1... 4546474849... 79
  Archived months: [feb2014] [apr2014]

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