Beginners - August 2016 (Page 3)

urgent! can someone help me please, what am I doing wrong?
 
what do i need to add? or remove? answer asap please #include <iostream> using namespace std; class DivSales { private: //variable declara...
[1 reply] : A couple of things from what I can see. Firstly, please use code tags ... (by TarikNeaj)
HELP PLEASE! C++ PROGRAM
 
can someone help me with this project please? write a program that has 2 different void functions, 2 functions that return numerical values, 1 function that ret...
[4 replies] Last: thank you all very much! (by cplusplus12389)
How to make string shorter?
 
Hello there, i wanna know how to make string's shorter (or cut letters from the string), there is an example: string number; cin >> number; //input from k...
[2 replies] Last: that was very simple, thanks a lot, thank also for the links! (by CosminPerRam)
Should I use static functions?
 
I'm trying to figure out which of the following options is the best way. In a library like GLM, you have functions like glm::perspective() . I didn't have to i...
[3 replies] Last: Thanks guys, helped a lot. I really thought glm::perspective was a sta... (by hashbrown)
Struggling learning C++
 
I've started trying to learn C++ a few days ago and I'm having trouble picking up on a lot of things. I have no experience with coding and I'm just wondering if...
[10 replies] Last: One last thing. Make more complex programmes by remaking old ones. (by Enot02)
Extracting a specific line from a file (1,2)
 
!Changed title from '2D array for mixed types' to better reflect contents of this thread! Hi again. Not sure if it belongs here, though i am a total newb. I am...
[35 replies] Last: All good by the sound of it. Qt is quite a learning curve but appears... (by closed account 48T7M4Gy)
[HELP] Curlpp with Visual Studio 2012
 
Hi All, I am trying to learn C++ with curlpp but getting following error could you please help me. Steps followed : 1) Downloaded Curlpp from https://code.go...
[2 replies] Last: > 2) Added Include libraries in VC++ directories. What does that mean?... (by coder777)
by danciu
c++ const_cast
 
Why the statement below print one address and two values: #include <iostream> using namespace std; int main() { const int i = 2147483646; int *j = const_...
[2 replies] Last: Thank you very much! (by danciu)
percent
 
I just want to say that: if(1 <= relay && relay <= 5) { tax_rate = 1%; } I don't need to compute a percentage; I just need to say for ...
[3 replies] Last: To convert back for other use: std::cout << tax_rate * 100 << "%"; ... (by boost lexical cast)
Best lightweight solution for cross platform development?
 
I'm interested in supporting multiple platforms with a few smaller ideas while I further my software development skills with the C++ programming language, but I...
[1 reply] : Firstly, you'll want your build system to work cross-platform. I stron... (by LB)
When multiplying vectors, why do I get -0.000000 results?
 
I've got the following operator overload for my Vector Class // vec3.cpp Vec3 Vec3::operator+(const Vec3 &v) const { return Vec3(x + v.x, y + v.y, z...
[7 replies] Last: i wrote: this->x = x; the left x is the x of the class, the right x... (by closed account 48bpfSEw)
skip? c++
 
i'm a c++ beginner.. how to add everything by 1 except arr2 .. i want arr2 to remain the same.. int arr = {6,6,6}; int arr2 = {6,0,6}; cout << ar...
[1 reply] : dual post http://www.cplusplus.com/forum/beginner/196515/ (by SamuelAdams)
How to check for file extension?
 
Hello! I am trying to have a user input a file name but I am trying to figure out some way for it to check for the extension and that it has at least one let...
[5 replies] Last: I am trying to have a user input a file name but I am trying to figur... (by SamuelAdams)
skip? c++
 
i'm a c++ beginner.. how to add everything by 1 except arr2 .. i want arr2 to remain the same.. int arr = {6,6,6}; int arr2 = {6,0,6,6}; cout << arr <...
[1 reply] : for (int i = 0; i < seeds; i++) { if (i != 1) { ... } } ... (by JayhawkZombie)
Easiest Decimal to binary Conversion
 
#include<iostream> #include <fstream> #include <string> using namespace std; int dectobin(int,int); int main(){ int decimalnum,base=2; cout <<"Enter ...
[1 reply] : http://stackoverflow.com/questions/2548282/decimal-to-binary-and-vice-... (by closed account 48bpfSEw)
How to write custom allocator for vector of pointers?
 
Hi guys. I am having this problem that I often use a vector of pointers to some objects. The problem is that I need to delete pointers in that vector manual...
[10 replies] Last: Thank you, that is exactly what I needed:) (by Unspoken)
Implementing const_reverse_iterator for List class
 
Textbook Problem Description: Add reverse iterators to the STL List class implementation. Define reverse_iterator and const_reverse_iterator. Add the methods rb...
[7 replies] Last: thank you so much!!! https://19216801.mobi/ (by Apple444)
C++ Loop
 
Hello Everyone! So it's been a while since I have coded so this might be a silly question. I am trying to create a loop that asks the user to "Enter an integer...
[2 replies] Last: Thank you so much! (by closed account SwAfjE8b)
Void with string function
 
Why isn't my "void display(string id) not showing up in the output? #include <iostream> #include <string> using namespace std; struct student_t { ...
[4 replies] Last: Thank you so much! :) (by blackbone16)
Clarification on when constructor / Assignment Operator is used
 
I would like to know exactly which function is invoked when you declare an object in this fashion: Object newObjectName = existingObject; I've always thought ...
[2 replies] Last: Cool. Thank you! (by mpark4656)
August 2016 Pages: 12345... 22
  Archived months: [jul2016] [sep2016]

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