Beginners - July 2017

by ntuli
some problems in running cpp functions programs
 
i am a new in C++, could anyone tell me error on this program.and How can it be fixed #include <iostream.h> int main() { double p = 99; double y; y = fu...
[3 replies] Last: As a new to c/c++ I recommend you to take it slow as c can get very co... (by benhart)
by xxvms
Book ID
 
I am not sure how to deal with one issue with my project. I have library with books (created using vector and smart pointers) [this is an exercise to learn how...
[4 replies] Last: i never used map so lets me read about this :) thank you! (by xxvms)
by Faggio
variable was not declared in this scope
 
compiler give me this error in the while loop: _id,_text,_mapAns was not declared in this scope I don't understand why!! #ifndef ANSWERCLASS_H #define...
[4 replies] Last: About the habit of starting variable names with an underscore: Brian ... (by Enoizat)
Trouble with program
 
I have some trouble here with the program, my specific problem is that I don't know how to display the asterisks at all. I don't know how to finish it. Quest...
[7 replies] Last: A couple of the other approaches I suggested - though it's unlikely ei... (by Chervil)
Division Algorithm
 
Reading through my course book for discrete mathematics. I am trying to put my programming skills into almost everything i read these days. But this one gives m...
[13 replies] Last: vs does not recognize 'and' as a keyword. To make it work #include <... (by coder777)
No idea understanding the logic/ how to complete the program
 
Hi there, I am having trouble understanding the logic behind this particular program. Here is what my understand so far and my plan: 1. Open the file...
[1 reply] : Your for loop does not access the file at all. Here is some informat... (by gunman353)
by TheArk
code
 
kpinjp'i
[4 replies] Last: Should be lowercase c on line 106. Unrelated, but lines 22 and 56 wil... (by lastchance)
Advice and pointers on soft keyboard for android and possibly windows
 
I find the software keyboard on my phone difficult to use because of trying to cram so many keys into a small space, and while there are sometimes a second page...
[3 replies] Last: I rarely get to use a laptop/desktop, like less often than once a week... (by DarkLightHitomi)
by GregJ7
App* value vs. App* entity
 
1. I get an error for the line in the try block. It is: a value of type "App *" cannot be assigned to an entity of type "App *" 2. Secondarily, for the...
[5 replies] Last: Something simple like this, perhaps: #include <iostream> struct App... (by JLBorges)
multiple definition of operator<<(std::ostream&, Shape const&)
 
Shape<-Triangle<-IsoTriangle Here shape and triangle are abstract classes. When I compile IsoTriangle rect(5,"DUMBA DUMBA"); cout << rect << endl; ...
[10 replies] Last: Putting the implementation in a source file has the advantage of faste... (by mbozzi)
strings into an array, then display them in reverse order
 
i completed the code but i cant find where the white space is. #include <iostream> #include <string> #include <cstring> using namespace std; int main() ...
[2 replies] Last: hi Chervil! thank you very much :) now i know that getline can get me ... (by lescarys)
Functions to mesure the time - problem with "clock()" and method "void delay(unsigned long)"
 
I am coding to measure the time following an "already done program" from a book. This is the on progress exercise: #include <time.h> // clock(), clock_t #inc...
[1 reply] : Could you explain better what your code should do? Perhaps you could f... (by Enoizat)
can someone give me an advice
 
i have a stupid question about "do", im a noob in c++ im using borland c++ atm. do { cout<<"\n ORDER : ";cin>>order; pay=0; for(total=1;total<=order;tot...
[1 reply] : It's hard to understand the code there, it is incomplete. A couple of... (by Chervil)
C++ simple code, unexpected results
 
Hello ! My name's AswanSensei, and I'm a beginner in C++. I recently coded the little program underneath, as an introduction to classes. However, the function s...
[3 replies] Last: those king of errors occur sometimes when dealing with c++ code. C++ c... (by benhart)
by ams149
undefined reference to function
 
Write your question here. problem is this code showing undefined reference to decof xora(int,int) error is showing on this line m= ob.xora(q[j-1],i[j-1]); ...
[2 replies] Last: Thanks, It works (by ams149)
Array
 
I am unable to find my mistake, and i don't know what I am doing incorrectly. I can't get right the element part. I need to do a Load 10 integers into an array,...
[4 replies] Last: Hello lescarys, Your are welcome. Anything else let me know. Andy (by Handy Andy)
std::string
 
Somewhere in one book I was reading about secure coding in C++ with std::string: So I came across one example given below: char input ; string::iterat...
[4 replies] Last: Thanks JLBorges :) Actually, you are right that this is an example of... (by akash16)
by Faggio
multigraph
 
Hi guys, i want to implement a WEIGHTED multigraph with list representation but i don't know how! where can i find an example or a guide? i need praticle exm...
[3 replies] Last: > with list representation I presume that we are talking about an ad... (by JLBorges)
efficiency improvements in my code
 
Hi everyone. I have written the code below, its just a daft lottery simulator. Is there a way to make it more efficient. Like using pointers or references in th...
[10 replies] Last: This may be faster (binary search instead of linear search): #includ... (by JLBorges)
reading files
 
Hello im trying to read a file and put it inside a 2D array, until now i succeded on reading the first line of the file and putting it into a 1D array (str ) bu...
[3 replies] Last: Just for hints: // Hello im trying to read a file and put it inside ... (by Enoizat)
July 2017 Pages: 123... 12
  Archived months: [jun2017] [aug2017]

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