General C++ Programming - October 2018 (Page 9)

Are static members available in new operator for a class?
 
I have a memory manager class for every class in my project. Example: class MyClass { private: c...
[1 reply] : Duh... nevermind. I am used to C#. Forgot the public keyword in fron... (by primem0ver)
by stav
Mingw - application unable to start
 
Hi im using mingw and im trying to link with glew the problem is that after compilation when i t...
[2 replies] Last: ah i figured it out, i was just being stupid. After downloading depend... (by stav)
Need help calling functions
 
int determineDay(int month, int day, int year) { char slash_dummy; cout << "Enter your date of b...
[2 replies] Last: Excuse my friend here hes new to human interaction. Return statement... (by bradltr95)
If then statement not working as intended, involving logical operators.
 
I'm am working on an assignment that involves if and then statements as well as logical operators. ...
[2 replies] Last: Thank You!! I know this probably means nothing here, but- +rep (by altbrian)
Generate a set of random numbers in the range of 50-100 and, for each set, count how many values fall into particular ranges
 
I almost have it, but the calculation is off when I try sorting the numbers into group. Any help wou...
[3 replies] Last: @doug thanks for your help I really appreciate it (by MrSkinflute)
Molecular Dynamics problem
 
I'm trying to do this question and I can not figure out how to. Molecular dynamics is a comput...
[1 reply] : Double-post, see http://www.cplusplus.com/forum/beginner/243637/ (by Repeater)
Facing error saying something about an 'unqualified Id'
 
#include<stdio.h> int add(int a,int b); int main(void) { int a,b,c; scanf("%d%d",&a,&b); ...
[2 replies] Last: thanks mate JLBorges.you made my day. (by pavankumardss)
how can i transfer the dayOfWeek variable to printDayOfBirth?
 
int determineDay(int month, int day, int year) { char slash_dummy; cout << "Enter your date of b...
[3 replies] Last: In addition to keskivertos answer my two cents: I assume there is a g... (by plexus)
std::sort behaves different
 
Vector containing pairs of int64_t and a string, on two different systems a std::sort is run on the ...
[5 replies] Last: Whoops, I had deleted my post right before you replied after realizing... (by Ganado)
I need to write a program that figures out how many prime numbers exist within an arbitrary, random range of numbers.
 
#include <iostream> #include <time.h> using namespace std; int main() { srand(time(NULL));...
[3 replies] Last: The only way to know the number of primes in any given range is to cou... (by Duthomhas)
executables on other machines
 
Hi guys, so I probably should know this by now but I seem to be a little unclear, lets say if ...
[11 replies] Last: Missed that ARM == AMD's cpu Huh? As far as I know, all windows mac... (by helios)
by rcx11
Protected members "not declared in this scope" in derived classes
 
So, I'm working with inheritance for the first time. The concept and implementation seemed pretty st...
[5 replies] Last: Yeah, I realized after doug4's original post that I wouldn't need that... (by rcx11)
which is the best way to convert a wstring to a string? (1,2)
 
Hi, This is my attempt at converting a wstring to a string: // convert wstring to string inline...
[22 replies] Last: Thanks to all your help, I have solved the problem I had. The final ve... (by JUAN DENT)
by Manga
static member inside of class in vector
 
I am testing a static variable inside of a class. I want it to count the number of instances of the ...
[7 replies] Last: Thanks. (by Manga)
text does not appear on screen
 
hi guys, I'm having a problem with SDL_ttf I am trying to display text to the screen but to no avai...
[1 reply] : **resolved sorry guys I forgot to create a texture from the surface... (by adam2016)
illegal else without matching if
 
bool isGregorianDate(int month, int day, int year) { if (year > 1752) { if (((((month - 1) % 2 ...
[2 replies] Last: You have an extra open parenthesis on the line that says else if ( ( ... (by tpb)
Coroutine implementation in c++
 
I am trying to implement coroutines (had to reinvent the wheel as part of my project) in c++. Every ...
[7 replies] Last: Each Pthread(Core) has two queues. One is where normal "running" coro... (by helios)
Usage of references as parameters
 
I've been working through "C++ Primer (5th Edition)" and stumbled upon a predicament: how do I know ...
[4 replies] Last: Also, see the relevant section of the Core Guidelines: https://github.... (by mbozzi)
Changing public members inside a class
 
I'm having 4 files : 1.) new.h - where I have declared my variables and only method #ifndef N...
[3 replies] Last: Thanks much @Ganado , @doug4 I understand What I'm doing wrong and th... (by Graindor)
How C++ represents inherintance in memory?
 
How is the multiple inheritance of c++ classes represented in memory? How does this work whit castin...
[3 replies] Last: Thanks for the examples, they were very useful. Also the reference to ... (by cbermudez)
October 2018 Pages: 1... 78910
  Archived months: [sep2018] [nov2018]

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