Beginners - June 2014 (Page 22)

by yepMe
Doubt in default constructor
 
Hi everybody, I have started studying thinking in c++ , in the chapter "Initialization and cleanup" I have doubt .The author says "you might be thinking the ...
[4 replies] Last: It is good especially for larger objects, which are going to be initia... (by TwilightSpectre)
How can I use this C++ code with vector?
 
I am having hexconvert function which takes hexadecimal string as input and converts it into the byte stream,when hex string is small it is working well with ar...
[5 replies] Last: Almost exactly the same as you have there. After all, vector was desig... (by TwilightSpectre)
by gingy
Primary Expression Error When Passing An Array Through Parameters To Another Function
 
I'm making a proof of concept program for what will basically be a base model for shops in a game I plan to make. I ran into an issue when I attempted to pass a...
[2 replies] Last: This resolved the issue. Thanks for the advice, I greatly appreciate i... (by gingy)
by h4ever
how to get length of string in vector?
 
I cannot find out how to get lengh of the string which is referred by (*it). sizeof((*it)) or length did not work for me. The conversion to c string failed... ...
[4 replies] Last: Now it works, int length = (*it).length(); I already tried before bu... (by h4ever)
by mehak
reference issues
 
We cannot apply arithmetic operations on a reference then how cum the follow code runs without error...shudn't n++ give an error? #include<iostream> usin...
[2 replies] Last: @mehak this is what you are doing: #include <iostream> using namespa... (by Atyab)
C++ Program That Reverses A Word/Sentence
 
Write your question here. Hello everyone i was tasked to write a program that takes a word/sentence then reverses the order of the word/sentence. I.E.: I like...
[3 replies] Last: string reverseWords(string str) { int posStart=0,posEnd=0; v... (by closed account j3Rz8vqX)
Programming Systems - QT or Vis Stu 2013 Exp
 
Hi, Firstly, thanks for any and all help given in advance. I have written our back office system in both VB6 and VB.Net (originally 2010 and now it has be...
[1 reply] : why do I need to buy a different one? It's just personal preference.... (by mutexe)
Guitar fretboard program
 
I have been trying to learn c++ for a few months now and all i have been really doing is reading and watching tutorials and not actually doing any real thinking...
[3 replies] Last: Problem solving and finding algorithms that work comes with experience... (by xismn)
Help with classes
 
I am getting a long error when I try and compile my multiset.cpp file. Something about the vector I am using. Error looks as follows: In file included from /...
[5 replies] Last: You need to #include <string> in Item.h , although I don't know if ... (by cire)
by mehak
static member functions,this pointer
 
this pointer is created whenever a member function is called.When a member function is called the address of the object which called the function gets pass...
[3 replies] Last: i jus wanted to confirm if its correct (by mehak)
by h4ever
iterator and for loop
 
Can you help with this? I am having loop where I am parsing argument. My problem is that I don't know how to access the characters under (*it). So I need to...
[6 replies] Last: Ok, thanks. (by h4ever)
by mehak
increment operator
 
initially a=0, ++a increments a to 1 and --a decrements it to 0 so x will be equal to zero..according to me the output should be 1,1,0 howevr the ans is 2,0,...
[1 reply] : Lines 6 and 7 are undefined, the output is arbitrary. There's a summa... (by Cubbi)
input format error
 
hi,i need to handle the input error. my code is like this: string name; int age; cin >> name; cin >> age; If the user input "name" only, without 9, how c...
[2 replies] Last: any more suggestions? (by simpsons)
by akif13
Dynamic Array
 
Hi. Why I can't get the sum and average of entered marks? #include <iostream> using namespace std; int main () { int i,n; float sum, avg; fl...
[3 replies] Last: Thanks (by akif13)
Constructor Error
 
Hello, I am getting a ISO C++ forbids declaration of Multiset() with no type [-fpermissive] whenever I try to compile my multiset.cpp file which includes multi...
[1 reply] : class Multi s et{ Multi S et(); ... (by helios)
by mehak
templates
 
are templates memory efficient and why?
[1 reply] : It depends on the particular templated thing. (by helios)
How do I...
 
Im working on a calculator and im having some issues. Im asking the users to enter an operation (cnum) and then, set a float (ctotal) equal to that operation re...
[10 replies] Last: Programming Principles and Practice Using C++ by Bjarne Stroustrup c... (by admkrk)
Understanding header files and .cpp files
 
Hi All, I am literally just beginning learning C++, following a beginners 21 day tutorial... so have no one I can ask these questions - other than you all! ...
[11 replies] Last: Thank you Chervil... will have a look at both of them... :) (by Paddedcell)
Private Member Functions
 
Hello, I need some help understanding this "Often, however, a class needs functions for internal processing that should not be called by code outside the ...
[2 replies] Last: Thank you very much ! :D (by NookLines)
What to work on next?
 
I am getting to the point with C++ where I can write some usable code and read most code without to much trouble, and I feel like I am ready for the next step, ...
[6 replies] Last: There is not a simple answer to that question. Basically it covers all... (by admkrk)
June 2014 Pages: 1... 2021222324... 48
  Archived months: [may2014] [jul2014]

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