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

how compare a char?
 
when i do: IsOperator(strinput[uintStringIndex+1])=='=' why i get these warning: "comparison of constant ''='' with boolean expression is always false [-Wb...
[11 replies] Last: Brilliant :) (by Ganado)
c++ simple trees
 
Can someone please tell me why the code crashes? I'm trying to code a simple binary search tree. Main.cpp #include <iostream> #include "tree.h" int main() ...
[2 replies] Last: Thanks for the help (by JustinPlusPlus)
competitive.. (1,2)
 
Please explain the below question with more testcases and explaining each of them. Katya has a sequence of integers a1,a2,…,an and an integer m. She def...
[32 replies] Last: How do I find modulo of large number in NMNMX? I have got the logic bu... (by luta)
Array
 
Hi guys, I have this list and I want put in array and then call it Aries March 21 - April 19 Taurus April 20 - May 20 Gemini May 21 - June 21 Cancer J...
[no replies]
Collision Detection Algorithm
 
Hi, I've got an array of GameObject class and I want to do something like this: vector<Gamobject> objects Trigger t; // will there be a problem if the trig...
[1 reply] : Collision Detection is a very broad subject, and the techniques can di... (by Ganado)
by Kr002
Maximization problem in 1D
 
Problem: We are given n points on a line numbered from 1..n and also the colors which we can use to connect any two adjacent points. 1 can be connected to 2 o...
[3 replies] Last: ok. hmm. still thinking. so far looking at … find all the conn... (by jonnin)
static vs dynamic linking
 
Hi guys,so I have asked a similar question before, but sometimes we need to include both a .lib file(static library) and a .dll file(dynamic library) with so...
[1 reply] : The .lib files are of two kinds: static libaries and import libraries.... (by tpb)
Competitive progrsmming
 
i am finding difficulty in finding x how should i find that? i can find Y in nlogn but not able to get the value of x You are given a string S of lowercase...
[13 replies] Last: You have written the wrong code in the input method such as Subtask #1... (by shivkumar12)
Need help looping through list of data frame
 
I have a list of data frames and I want to loop through the list and within each element in that list (i.e., data frame) loop through the columns to transform t...
[3 replies] Last: No prob. Alternatively, this is exactly the kind of thing that awk was... (by tpb)
by ORF
different behaviour compiled by clang vs GCC
 
Hello, I have a multi-thread program, which behaves differently when compiled by GCC or clang (exactly the same source code; same CMakeLists.txt ). The m...
[4 replies] Last: also, see what happens if you put the volatile keyword on the variable... (by jonnin)
Calculate consume cpu language c
 
Hi! How calculate consume cpu in process using language c? Thanks, Thcelo
[6 replies] Last: Use KBW's answer. (by jonnin)
dll resources?
 
Hi guys so from what I read and I will quote an answer from stackoverflow A DLL contains functions, classes, variables, UIs and resources (such as icons,...
[4 replies] Last: how would a dll file possibly contain resources such as icons,images ... (by gaxio)
by mk3000
problem with adding number to variable when overloading a operator
 
#include <iostream> using namespace std; class MY_OBJECT { public: int x, y, w, h; }; class MY_ROOM { public: MY_OBJECT *objects ; int objNum = 0...
[2 replies] Last: When you see << or >> in the context of a stream, the arrow points in ... (by mbozzi)
What's wrong with the language? (1,2)
 
So, I have been using C++ informally (and a ton of other things, but C++ was my first) since middle school, which was about 15 years ago. It was nice, all these...
[20 replies] Last: [quote=helios]b.foo() can be resolved statically because B overrides n... (by Peter87)
Access pointer methods of pointer vector
 
I'm not really sure how to phrase the question exactly correctly, but I've declared two vectors std::vector<enemy*> enemies; std::vector<hit_area *> effects;...
[4 replies] Last: repackage data? Eg, say you had a list or tree or something of data ... (by jonnin)
How to create executable from engine ?
 
hi, I am working on a game engine project but I have a problem. In my game engine, there will 2 modes. Editor mode and play in editor mode(Like in unity). But I...
[11 replies] Last: Yeah, usually if you have a game engine it either loads DLLs (might be... (by kohlrak)
sdl_ttf Corrupted message
 
hi, the message should say "current inited object count:" but it looks like this : http://i.hizliresim.com/vPXgn4.jpg here is the code: void displaytext(co...
[7 replies] Last: I see someone already fixed your problem, but there's another huge pro... (by gaxio)
Storing text file(usually made with fstream) ONLINE
 
In Short, i want to use fstream, but rather than the fstream accessing files from the local program folder...i want fstream to access Files present online. (eve...
[4 replies] Last: I agree with above, my thoughts are you simply need something to contr... (by SamuelAdams)
Save vector objects in a file
 
Hi, my older question http://www.cplusplus.com/forum/general/238988/ was about creating an object factory. But now I have a problem I must save objects in vect...
[13 replies] Last: Thank you :) (by closed account DEhqDjzh)
why increment Operator Producing such an output
 
#include<constream.h> void main() { clrscr(); int n=10 ; int b ; // 13 13 13 b = ...
[1 reply] : b = ++n + ++n + ++n; This does three increments, and three addition... (by Repeater)
July 2018 Pages: 1... 34567... 9
  Archived months: [jun2018] [aug2018]

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