Beginners - September 2016 (Page 29)

throw exception
 
Write your question here. Function() { if else { } else { } if( THIS OCCURS){ #if exception throw : std::bad_alloc(); #else...
[5 replies] Last: Btw, there is no catch block in your code which is also expected to be... (by davBams)
Remove Elements that are in one vector from another
 
I need to remove the elements that appear in Vector A and Vector B, but keep the elements that are only in Vector A. The vectors can be of any size, but are not...
[1 reply] : If you could sort both vectors, then you could compute their interse... (by keskiverto)
Searching for an array
 
Hello programmers i need my code to do this for example "I will enter a number 2 the output should be number 8" and can someone turn it into a function thankyou...
[2 replies] Last: Cruicial, If what you want to do is enter 2 into getSearchNumber an... (by Handy Andy)
Copy only select elements of a vector to another
 
I have a data file such as: (* Sunspot data collected by Robin McQuinn from *) (* http://sidc.oma.be/html/sunspot.html *) (* Month: 1749 01 *) 58 (* ...
[2 replies] Last: Using std::regex (note: does not account for comments nested within ... (by JLBorges)
xdg-open don't open full url
 
xdg-open don't open full url It only opens till http://somesite.com/site/Login/?domain=anisdn.com and ignore the rest of the url (o.e &request) Using Linux - Qt...
[no replies]
Trouble with saving String into .txt
 
I am writing a program that read entered string and its length from input. I have to save string and length into .txt document. I am having issues with saving...
[2 replies] Last: Oh my bad english again... Thank you (by Pudings)
Getting the second smallest number from 4 inputs.
 
Hey guys, I am stuck and don't know what to do next. I was going with this approach where I get both the smallest number and the second smallest and at the end ...
[10 replies] Last: [quote=boost lexical cast]You really do like using a lot of functions.... (by JayhawkZombie)
Inserting in a 2-3-4 tree
 
I'm aware that the code here may be a little messy, but I can't seem to figure out the process of adding and splitting in the tree. No matter what I do, I alway...
[8 replies] Last: I was able to get it all working now. Thank you for your feedback! (by herooftime1000)
Rock Paper Scissors code using if-then statements
 
How do I make this code correct using "switch" and "if-then" statements? /* Program designed to play rock, paper, scissors with a user. */ #includ...
[1 reply] : Line 29. The correct syntax is computerCh = rand() % 3; , because you... (by closed account iGLbpfjN)
Insertion Array
 
I need to insert a number in the middle of an array. the program should be in fucntion #include<iostream> using namespace std; int main() { int array =...
[6 replies] Last: @Thomas1965 I know, just thought it might be a better idea to use a li... (by tristan1333)
Help with pointers
 
Hello all, I came across these lines and did not make any sense to me. int *XPos, *YPos; int f; int nFrames = 10; XPos = new int ; YPos = new int ...
[2 replies] Last: If i use cout< XPos << endl; I see 10 values of XPos in the first el... (by keskiverto)
game project
 
hello every one; while I was learning c++ I thought it was something boring that I cannot build any games; so I started to build one; its small and not funn...
[no replies]
Creating sprites directly from textfile. (SFML)
 
Hi there, I would like to ask how to create SFML sprites directly from a textfile. The textfile holds some sprite names. I know that it's not possible to force...
[4 replies] Last: Ok, thanks for the help. I think, that I've found now a revolutionary ... (by Bronislaw)
C++ in college, need help with first assignment
 
Overview Write a program to calculate the number of singles and total number of bases for a baseball player using information supplied by the player. If you'r...
[5 replies] Last: This name is attributed to Rick Mascitti (mid-1983) and was first time... (by saraheil)
Problem addressing char array
 
I have two variables char command {"ignore", "start", "stop"}; and char dataReceived ; The idea is to be able to compare any one of the three commands to t...
[2 replies] Last: Thanks, I would never have found that. :( (by vagulus)
Program for this?
 
Write your question here. X C O M P U T E R S 0 1 2 3 4 5 6 7 8 9 ENTER 489.50 OUTPUT PRS.UX thanks :D
[2 replies] Last: Figured it out already thanks anyways :D //strcmp #include <iostream... (by wenezki)
Help with my code
 
Can anyone tell me what's wrong with my code? The function print is supposed to print each element of the array but doesn't seem to work. #include <io...
[2 replies] Last: Thank you so much. (by whiteja03)
Non assign enum in the range
 
Is this a legit thing to do? Define enum SPORT { basketball, baseball, football, hockey, tennis, handball, soccer, shooting, swimming, gymnastics} int d...
[2 replies] Last: randompersonhere, It looks like you know that enums start at zero. If... (by Handy Andy)
Writing a program with array
 
I need to write and array that generates random integers and stores them in an array and the user enters the number of integers to generate and their range of v...
[1 reply] : int *arr = new int ; ... //Fill array, do whatever ... delete arr; ... (by JayhawkZombie)
Help with percentages
 
How do I deal with percentages? #include <iostream> #include <iomanip> using namespace std; int main() { int bases, doubles, triples; int homer...
[2 replies] Last: Line 21 should be before line 20, you just cant use singles in you f... (by shadder)
September 2016 Pages: 1... 2728293031... 34
  Archived months: [aug2016] [oct2016]

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