General C++ Programming - March 2015 (Page 21)

Unreal Engine 4 code Stopped Compiling
 
I have been using unreal engine 4 with c++, but it suddenly stopped working. The error message was "Unhandled Exception: System.AccessViolationException: Attemp...
[1 reply] : Nevermind. I restarted my computer and that fixed it. (by fabtasticwill)
Float square of int
 
I was googling like and hour but still I could not find anything about my problem. Is there a way to square a number like: 5.14th square of number 5, WITHOUT u...
[2 replies] Last: Also, a really basic method for this thing would be doing it the power... (by otakujome)
2d Array Bubble Sort
 
I'm completely stuck. I need to bubble sort two 2d arrays. Basically I need to bubble sort the first 2d array which holds last names. If the last names are the ...
[4 replies] Last: Seems like i'm getting the correct results for now with this code. I j... (by Accelerator)
operator overloading
 
So I put together a program and I am wondering why this program doesn't run if I omit a piece of code which I post below. #ifndef CAT_H #define CAT_H class...
[2 replies] Last: Thanks Yanson. I understand now. (by cppnoob25)
String: White Spaces within a do while loop
 
I'm creating a program that calculates the income of employee/s. Whenever I try and input a name with a space, it turns into an infinite loop. How can I fix thi...
[no replies]
Void Function
 
Can you help me to use void? What is the advantages and disadvantages of void? How can I maximize this function? Thanks
[8 replies] Last: Thanks sir! I think I need to test another functions :) (by ryanjoshiii)
what do i do?
 
i want is to repeat ones #include <stdio.h> int main(){ int num, flag; char name ; int retry = 1; int end_flag; while(retry ==...
[1 reply] : Please edit your post and make sure your code is [co de]between code ... (by LB)
Getting segmentation fault 11...
 
I have been trying to figure out where but my compiler doesn't give me any errors and it just crashes when it runs. Can anyone shed some insight? Here is main(...
[4 replies] Last: Thank you! That got rid of the segmentation fault. (by SpanishViking13)
by takzee
next_permutation with OMP
 
Hi all , I am working on a solution to the travelling salesman problem with parallelization I'm using next_permutation to get the permutation for the cities t...
[no replies]
Inteperter Creation
 
For the past few months i have been starting on developing the syntax ideas for a new programming language, i decided to call SIF. It will be interpreted. I hav...
[1 reply] : :D good for you. its a lot of fun. im currently working on a compiler.... (by Little Bobby Tables)
Question about C++ vectors.
 
What is the correct way to put data into (or take it out of a vector)? Lets say I have a vactor. vector<int> MyVect(5); To put something into it should...
[2 replies] Last: at() does bounds checking and will throw an exception if you access an... (by Disch)
by xystus
Prediction.
 
I'm not really sure if this is possible, but, lets say we have 2 ratios. One ration is for one person, the other ratio is for another person. The ratio shows th...
[8 replies] Last: I completely understand what you are saying. But I don't think you und... (by Militie)
Thoughts on "The C++ Programming Language"
 
I found this book by a chance. Seems good but it's quite big. Can anybody recommend it to a beginner like myself? Here is what I'm talking about: http://ebookbe...
[3 replies] Last: Mmmm, yeah you are a bit lazy here. not really... even if he does re... (by Little Bobby Tables)
graph strategies for binary file output
 
I've written a multigraph template class implemented as an adjacency list. I would like to be able to write this to a binary file. None of the tutorials I've se...
[1 reply] : You can guarantee sizes of integral types: http://en.cppreference.com/... (by LB)
by xystus
Calculating % chance to win against something.
 
Basically i want to enter in certain values (in my case k/d ratio, and accuracy are 2 examples) for player a and player b. The values entered for player a will ...
[11 replies] Last: You could let players rate the fairness of other players. The issue is... (by LB)
by Micard
How to create a loop?
 
Hey there, I have this piece of code. How do I make it read the file line after line? Now it only reads one line: void loadlist(Passenger *&head, Passenger *...
[2 replies] Last: It is working PERFECTLY well. Thank you very much! I think I understan... (by Micard)
How to change my bubble sort program to sort from a text file?
 
I am new to programming and for a class project, we are to create a bubble sort program. The program works right now by asking the user to enter in the number o...
[1 reply] : Please do not post more than once: http://www.cplusplus.com/forum/begi... (by LB)
by montop
Account Class Link errors
 
My class recently switched from C to C++ and I have been having some trouble with class "permission" for lack of a better work. I keep getting a LNK2019 error r...
[10 replies] Last: Yeah, I not creating the destructor was the source of my problems! Tha... (by montop)
How to Match Values Within Arrays
 
Hi I'm trying to write a function that will match the values within an array and the other; for for example.. if I have an array of size 16 called dimT=16 a...
[3 replies] Last: Conceptually this task can use an equivalent of std::string::find See ... (by keskiverto)
Printing out value of 2147483647
 
I am reading in a string of ints (1112, 1234, 1892, 1987) and for the digits that are greater than its left and right neighbors, I will replace that digit with ...
[4 replies] Last: Why is integer int? Make it a string and you don't even need to conv... (by coder777)
March 2015 Pages: 1... 1920212223... 28
  Archived months: [feb2015] [apr2015]

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