General C++ Programming - February 2016 (Page 8)

by Kubani
Throw and Catch
 
Hi all, The following code is a simple auto_ptr class supporting only a few operators. I tried to provide the code with some eception handlers that seem to b...
[6 replies] Last: [quote=Kubani]What thing invokes the destructor at the end of the code... (by Peter87)
by leeram
Help with MultiplyPolynomials issue of c++
 
Hello everyone , This is my first post . Recently , I got problem from c++ exercise question of book , please step by step to help me , thanks a lot at advance ...
[no replies]
by e7kim
Variable error?
 
I am working on this code and I finished but i have 2 errors on line 19 about variables y and m, saying that they are uninitialized local variables. I don't see...
[2 replies] Last: Thanks!!! (by e7kim)
by jed47
C++ TicTacToe Minimax Issue
 
I seem to be having a hard time on the minimax function on my C++ app. I've been trying to emulate the minimax function I found on this link: https://gist.githu...
[no replies]
How do I check if a variable is of a given type?
 
I want to put a function into my program that outputs to the console the type of any given variable. The problem is that the outputted names of some - or all - ...
[1 reply] : Look at <type_traits> : #include <type_traits> #include <iostream> ... (by TwilightSpectre)
Trigonometry to solve physics problem
 
Hi. I'm trying to move back some squares after collision, and right now it's not working too well. I believe the issue is my trigonometry code where i'm trying ...
[6 replies] Last: I've managed to solve most problems, and now my only issue is that whe... (by zippo88)
Why does any c++ program I compile always take up an initial 5 to 6 MB of RAM?
 
Okay, so I am the sorta person who is crazed and addicted to every last sweet drop of performance, and I was just wondering why no matter what I do, my c++ prog...
[6 replies] Last: Thank you so much helios! (by da peppester)
can't access member from for() loop
 
When I try to access a member from array card_deck type Card_Deck I am getting a compiler error: src\main.cpp:29:20: error: 'struct std::array<Card_Deck, 52u...
[5 replies] Last: Oh, got it. : ) I've done the same exercise with enums. Good suggesti... (by technologist)
how to use enable_if for parameters?
 
Hi, I want to have two definitions for createRawVector and one is to exist only when the parameter is an rvalue reference. I can test for T but how can I test ...
[2 replies] Last: Thanks, it worked!!! (by JUAN DENT)
Please help, fstream/stringstream
 
figured it out, thank you everyone.
[3 replies] Last: To me part of your instructions don't make a lot of sense. Part of the... (by jlb)
merge sort
 
the code isn't sorting elements and just printing the unsorted elements ? #include <iostream> #include<math.h> #include<string> using names...
[1 reply] : Function merge_sort() calls itself recursively until the program run... (by Chervil)
displaying linkedlist
 
City C1(11,"Kuala Lumpur"); City C2(12,"Melaka"); City C3(13,"Penang"); Linkedlist<City>c; c.insert(1,C1); c.insert(2,C2); c.insert(3,C3) i already inser...
[5 replies] Last: Actually, I've been trying to operate under the assumption he's not a ... (by MikeyBoy)
Function call for an array of struct objects
 
So before I get flamed, in this project for school I am not allowed to use <string> library only cstring. Someone Please tell me why my function call is not wor...
[3 replies] Last: Yes, that's much better. I assume TarikNeaj's post has explained your... (by MikeyBoy)
by homing
C++ free cache miss / performance profiler?
 
Hey, do you guys know any good free profiler for cache miss and/or general performance? It would need one for Windows(VS2015 Community) and OS-X(XCode).
[5 replies] Last: I still would need a good profiling tool for Windows. Does Visual Stud... (by homing)
Move Constructor doesn't get called
 
Hello guys. I've my own class String // Move Constructor GString(GString&& move) { std::cout << "Move" << std::endl; // ... code ... } // Shou...
[11 replies] Last: WHY does the GList move constructor get called then? Is it racism? Lol (by gedamial)
Error: conversion to inaccessible base class not allowed
 
I am trying to print out a list, compiler is giving me the error mentioned in the title. I've marked below where I am getting my error at: (***) Thank you to a...
[2 replies] Last: class OListType:ListType<T> is equivalent to class OListType: priv... (by ne555)
I need help building a program please.
 
Write a complete C++ program that will do all the following tasks. Each type of loop (while, for, do/while) must be used at least once. Create a loop that wil...
[1 reply] : Advice is to break the problem and execute the task one by one try to... (by mogha)
CRC of a message char array
 
i have a char array , with comma seperated tokens like ?>100,1023,255..\n whats the best way of generating a CRC for it ?shall i just generate the CRC for...
[15 replies] Last: but why would you turn all bits high ? The CRC32 algorithm uses a 32-... (by helios)
How to inherit a template class??
 
I am trying to inherit the contents of one template class from one header file, to another template class which is in a separate header file. Here is what I ha...
[2 replies] Last: thank you sir, solved. (by Outlaw782)
by suroh
Issues with arrays
 
I'm trying to perform various operations on an array EDIT: I forgot that some people on the internet prefer to ignore obvious things. 1. I need to create an i...
[6 replies] Last: I didn't read the entirety of the first post because is was long and r... (by doug4)
February 2016 Pages: 1... 678910... 21
  Archived months: [jan2016] [mar2016]

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