Beginners - November 2016 (Page 44)

pointer to pointer issue
 
int a,b; int *ptr; int**ptrptr; ptr =&a; ptrptr=&ptr; Using no other objects besides those already declared, how can you alter ptrptr so that ...
[2 replies] Last: thanks (by zeroblank)
Ok.. I have a dumb question -.-
 
thank u
[3 replies] Last: To fix your program you have to re-initialize the num variable before ... (by Nico)
by Beez
Undefined Reference Error
 
Getting this error when I call isPalindrome in my main function. Is it because I #include "isPalindrome.h" twice? Once in my implementation and once in my main?...
[1 reply] : http://www.cplusplus.com/forum/general/113904/#msg622055 (by ne555)
arrays.. what is the difference between these two evaluations ?
 
gives me the same output of input value at index 0 =9 int inputVal = 9 int itemsRead =0; array.resize( array.size( ) * 2 + 1 ) ; array[ itemsRead...
[3 replies] Last: In the first, 'itemsRead' is incremented after 9 is assigned to the 0t... (by Arslan7041)
by jlogic
Count number of occurrences of a given substring in a string
 
I am trying to count the number of times a given substring is present within a string. My could always gives 0, unless I have the same substring and string, whi...
[6 replies] Last: You should reverse the role of str_to_search and str. int nPos = str.... (by SakurasouBusters)
Undefined Reference to `ExampleWindow::ExampleWindow()`
 
I've asked this at Stack Overflow but my question was marked as a duplicate and when I go to the link where they say my question is already answered there, I ca...
[5 replies] Last: ander@Ander:~/C++_Programming/test$ g++ main.cc -o seimple `pkg-confi... (by Karanaka Kun)
Tracking the float remainder of an int-locked object
 
I would like to have an elegant solution to an admittedly trivial problem, if possible. I currently have a solution, but it uses If/Else and I feel, in this ca...
[2 replies] Last: But let's assume that it is (maybe your math is in units of chunky te... (by treefitty)
Output help!!
 
How do i write a code to write the result of the below code to a .txt file ? #include <iostream> #include <string> #include <fstream> using namespace std;...
[2 replies] Last: #include <iostream> #include <string> #include <fstream> using names... (by One in a million)
Reading from a text file but it won't open!
 
I'm just using a text file that I made as 'poop.txt' Wrote random words and tried to open it. I can't get the file to open..? Is there something wrong with ...
[2 replies] Last: OP: Read the following links why eof() is considered a bad idea within... (by gunnerfunner)
"No operator '!=' matches these operands."
 
Hey guys I'm writing a program and attempting to use a Sentinel but the "not equal to" operator != doesn't seem to be working for me. Can anyone help me corr...
[4 replies] Last: int topScore; Should be : int topScore = 0 ; ... (by SakurasouBusters)
2D array finding the most frequent element
 
I am doing a homework about greyscale bitmap and I am going to find the most frequently occuring greyscale level in an image. value 0=black 255=pure wh...
[3 replies] Last: oh I figered it out. The problem is where the tempCount=0; is placed. ... (by Luke 1345)
by Zorai
Quick help with this treasure-finding code
 
Hello, I am having difficulty adding in one feature into my code that I have written. I only have trouble with the bolded part... Here is the exercise: A treas...
[1 reply] : Add a step counter that counts up 1 every time the explorer moves. Ch... (by joe864864)
Vectors: Can you use reserve for a string vector?
 
The program crashes when I use reserve: #include <iostream> #include <vector> using namespace std; int main() { vector<string> v; v.reserve(...
[6 replies] Last: http://stackoverflow.com/a/6911339/3881189 It says that I should use ... (by FluorescentGreen5)
by nuril
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] : I believe you are asking about the difference between a do while loop ... (by joe864864)
Prompt Player to Play again or Quit
 
I am wanting to provide the player of my game with an option to play the game again once the end screen has appeared or to quit the application(tic-tac-toe game...
[9 replies] Last: > I did it before, and it worked. Calling main is allowed in C; if it... (by JLBorges)
When to break code into small functions?
 
I understand the important of breaking big complex code into smaller functions. But for small programs like for example: finding the player with the highest sco...
[2 replies] Last: Is there a general rule when one should break the code into smaller ... (by andywestken)
by ara123
See the output on the screen after debugging
 
Hi everyone, I am very new to C++, I am working on a cryptography project. After building the solution on visual studio, when i debug it, a black window (lik...
[5 replies] Last: Setting the subsystem of your project to "console" is the correct way ... (by cire)
November 2016 Pages: 1... 424344
  Archived months: [oct2016] [dec2016]

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