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

Linker errors with Namespaces in .h and .cpp
 
Hi. I have a .h like this #pragma once namespace ged { namespace Data { class GString { private: char* mainString; int size; ...
[4 replies] Last: Also, one can use a namespace alias, if referring to a class from else... (by TheIdeasMan)
Vowel/Consonant counting function using cin.get();
 
Hi. I am attempting to write a program that counts vowels, consonants, and white spaces. i have to use cin.get(); and a function. This is what i have. #inc...
[4 replies] Last: I tried that but i still didnt get the outcome i wanted. after i type ... (by baronrhys)
Linked list, operator >> and << overloading.
 
For some reason when I overload operators << and >> in my linked, that I will be using for my inventory system, I am unable to access the private members of my ...
[5 replies] Last: @Cire Man I'm so dumb. I didn't even notice I was taking the istream a... (by rabster)
Function Pointer assignment cannot convert types
 
Has anyone seen this issue? I am not sure how to correct it? Thank you! class MainClass { private: typedef bool (MainClass::*FunctionPointerType)...
[2 replies] Last: Thank you so much for your help! This definitively worked!! I was ... (by alex94102)
Code Review Request
 
Hello Everyone, I hope you are all doing fine. I am trying to learn C++ and I am following tutorials in youtube, have got some books and other materials for re...
[7 replies] Last: @JLBorges, Thank you for being specific and clear and for pointing me ... (by Alienguard)
Why is (stl->vector) not printing to cout?
 
Hello all here is the code #include <iostream> #include <set> #include <vector> int main() { std::set<std::string> setB {"1","2"}; std::vector<std...
[2 replies] Last: Fixed. Ran a clean. (by Bdanielz)
.dat file in a program
 
Hi, programmers. The Prof. Asked me to do the following: In a program, you need to store the names and populations of 12 countries. Create arrays to store...
[4 replies] Last: [quote=g3n0m3]second mistake is by treating your data type country as ... (by Chervil)
Segementation fault from passing string
 
I am trying to make a simple demographics input program. Enter name, age, birthdate, out put to a CSV file. I am getting a segmentation fault when my getName ...
[10 replies] Last: I would use the demographics function to call the needed methods, get... (by jlb)
Need help to write a program on the the requirement
 
Hi, I am beginner to the c++ program, and have one requirement as my assignment and need help. can any one help me with the programme Requirement: ...
[1 reply] : we cannot just do your homework, you have to atleast try and give us y... (by g3n0m3)
pointer arrays and std::array
 
Are the two arrays, one from c++11 and the other prior, basically the same from the vantage input/output? I was struggling with understanding array<>my_array et...
[5 replies] Last: why would u choose vector? One reason is because it is easier to cre... (by jlb)
My overloaded std::istream function is a friend of the class, but it still can't access private members; why?
 
As the title says, I'm having this really dumb problem when trying to overload the input operator>> with class objects when the overloaded function has already ...
[4 replies] Last: I'm having this really dumb problem when trying to overload the inpu... (by jlb)
problem..
 
I was writing a calculator then when I decided to compile it (unfinished) it says "undeclared doPrint" and many other errors.. Code: //#include <stdafx.h> #inc...
[2 replies] Last: So, you put ; where you are not supposed to, and you don't put it wher... (by naaissus)
by Ginso
edit video using ffmpeg
 
Hello, i just downloaded the ffmpeg library. I am new to ffmpeg and what i want to do is the following: -open a video file -edit or replace some frames -s...
[2 replies] Last: well that only shows how to extract the images. How can i make a Video... (by Ginso)
by aruggs
Binary Search on String
 
Hello, Can someone look at the below and give me some feedback? Point of the program is to sort a string of names and then return the position when its found...
[1 reply] : Hi :D Pls use code tags next time. Since you are not returning anythi... (by naaissus)
by Kubani
Using malloc and free in C++ (1,2)
 
Hello all, I'm working on an exercise that says I should using the following My_allocator class design my own vector . It's this: template <class T> class...
[21 replies] Last: I had noticed the template class which was before it and not complet... (by Kubani)
Speed of a pointer that traverses
 
This a question about pointers. If I move a point to a new address, int * ptr = new int ; Does it take longer to travel through more bits. I.E. ptr + 1...
[2 replies] Last: Perfect. Thank you! (by keanedawg)
chess moves
 
hi all i need to program the moves for bishop and knight in my chess game with no AI i have created the board and everything else. i just need help with movi...
[1 reply] : http://www.cplusplus.com/forum/beginner/1/ (by TarikNeaj)
While loop infinite after second loop
 
My main runs through the loop once and only goes to the if 1. It inputs, then pulls the main up and no matter what you choose, it goes back to the first option ...
[1 reply] : All your comparisons are using the assignment operator rather than the... (by TwilightSpectre)
by Zakusa
script wont work after adding in a another part to it
 
hi ya so my script wont work after i add in another part i know its a simple fix but its too hard for me where it says "case WM_CREATE - break;" thats the thing...
[2 replies] Last: ya well im learning and i did try creatoolhelp32snapshot but it didnt ... (by Zakusa)
by Xriuk
Difference between using this and not with virtual functions
 
I have two classes: class A{ virtual void func(){ std::cout<<"I'm A\n"; } void func2(){ func(); // Is there any difference from this.func();? } }; class B ...
[7 replies] Last: [quote=Xriuk]func(); // Is there any difference from this.func();? Ye... (by TwilightSpectre)
February 2016 Pages: 1... 1011121314... 21
  Archived months: [jan2016] [mar2016]

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