General C++ Programming - July 2018 (Page 6)

SDL - Renderer doesn't updates.
 
Hello people from CPP. First post. Well, I'm in an awkward situation with my code, because it compiles, but doesn't works properly and doesn't returns any error...
[2 replies] Last: The use of SDL_PollEvent looks fine, if all you want to do is check fo... (by Peter87)
enum vs #define
 
How can I use enum like I would use the #define preprocessor macro? For example, with #define, I can do something like : #define STANDARD_RED_COLOR Vector3...
[6 replies] Last: As a variant to @JLBorges, I would prefer to do this: #include <cst... (by gaxio)
estimation of time to learn how to make specific program, or hire programmer ?
 
Hello, i am in chronic pain and i know currently only basics to pointers. I want make a program, to which i put like database of foods and their nutritional i...
[2 replies] Last: the data portion sounds like the kicker. If you have the database or ... (by jonnin)
FileReader() -- Error -- Printing last line twice
 
Hello guys, i need help with this issue, i am trying to read a text file and process it, so i did it, but it read the last line twice and i would like your help...
[4 replies] Last: should i use global variable? No, learn to pass variables to and fro... (by jlb)
combinations of variables , ambiguous thing
 
Hello, lets say i have variables of type int: a = 50 b = 150 c = 100 d = 200 And than i want create another variable, or some other type, lets call it water e....
[1 reply] : I would forget the combinations. put the 4 values into a vector and s... (by jonnin)
by StMick
Incorrect Fibonacci Modulo Results
 
Im trying to write a program that reads in a Fibonacci number (n) and a modulo number(m) and then returns that Fibonacci numbers modulus (if the numbers are wit...
[2 replies] Last: 1) lookup the golden ratio. After the first few values, you can direc... (by jonnin)
by rbwtp
Can't free memory. Don't know why..
 
#include <iostream> #include <assert.h> using namespace std; struct node { int data; node *next; }; class LinkedList { node *head; node *tai...
[3 replies] Last: Dynamically allocated memory has no scope and will stay allocated unt... (by MikeyBoy)
Room lights
 
A house has n x m rooms (n, m >= 2) they're represented by a matrix with n rows (from 0 to n-1) and m columns (from 0 to m-1). Every room, expect the first row...
[1 reply] : Duplicate of http://www.cplusplus.com/forum/beginner/239504/ (by MikeyBoy)
by sati53
Could someone explain what is wrong here?
 
Hello, I have a code that gives wrong output. I have 3 classes, i.e., Material, Elastic and Solver. The Material is a parent class and the Elastic is derived...
[6 replies] Last: Well, I am writing a Finite Element code. So the idea is to create a p... (by sati53)
by Lex33
task Problem set Methode (1,2)
 
Hi I have problems implementing a method set : I have implemented it in the CCalendarEntry.cpp but getting errors . Please Help: Here are the codes...
[26 replies] Last: Somebody there ? (by Lex33)
I dont know why its not working (1,2)
 
Katya has a sequence of integers a1,a2,…,an and an integer m. She defines a good sequence of integers as a non-empty sequence such that the sums of all i...
[23 replies] Last: @anikdutta10 check this thread: http://www.cplusplus.com/forum/general... (by closed account oG3kizwU)
LIBC string.find() bug !?
 
Has anyone encountered the following issue using the string_object.find() method? The method is returning a large address value, larger than even the string_...
[4 replies] Last: yep, that was my issue... sorry to bother all... once i used size_t t... (by rrmestl)
competitive
 
problem link : https://www.spoj.com/problems/DQUERY/ i applied MO's ALgorithm and i don't know why i am getting TLE please tell what changes i should make ...
[13 replies] Last: the vector not being preallocated. And consider that Ness said about... (by jonnin)
4-digit numbers guessing game - need help
 
Hi forums, i need someone's help to solve this problem. I am trying to use the random function to generate a four digit numbers and give clues when the user ent...
[3 replies] Last: To All : I have already fixed the problem by using the MOD and intege... (by danielteh)
Need help with memory leak while multi-threading
 
There is a memory leak below when the struct is being passed to a thread. Can not understand why, as the code inside the thread if called directly in the main t...
[4 replies] Last: It sounds like pthread_exit() didn't call a destructor. Since you're u... (by tpb)
Prime factorisation method for nCr
 
Can anyone help with the code to calculate nCr by reducing the expression to prime factors?
[1 reply] : What have you tried so far? What expression are you referring to? I ho... (by Ganado)
read a text file
 
hello guys, I am trying to read a text file which contains 5 blocks of 7 lines each, and each lines have different datatypes as follow: *Beginning of text...
[3 replies] Last: Yes, you need to replace std::istringstream with std::ifstream + prope... (by Ganado)
I wants to change places in the arrays
 
http://i.hizliresim.com/1EN2DB.png helpp!! case 2 #include <iostream> #include <iomanip> using namespace std; int main() { cout << "Dizi boyutu: "; ...
[5 replies] Last: Java works differently from C++. But you also need an container to st... (by kbw)
Translate key combination to ASCII?
 
Hi, i have been thinking about how i can translate example (SHIFT + ALT + 2) to @. I been checking google but i can't find anything, i thought getasynckey woul...
[6 replies] Last: You would think there would be. I dunno. None of my big programs com... (by jonnin)
Magic Set - Codechef Problem
 
Can anyone tell why in the sample input 1 it is given output 0 saying no good subsequences,although we can have subsequence (1,2) whose sum is divisible by 3? ...
[2 replies] Last: You sure have picked some awful, awful, awful names for your variables... (by Repeater)
July 2018 Pages: 1... 456789
  Archived months: [jun2018] [aug2018]

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