Beginners - January 2014 (Page 12)

by venros
C++ Calculator
 
Hi Guys, Im writing out my first calculator but for some reason its not building, nor is it showing me where the error is. #include <iostream> #incl...
[4 replies] Last: You are forgetting the return statement in your solve function. You... (by giblit)
Monte Carlo method for pi
 
Hey all, I am trying to use the monte carlo method to determine pi. I think there is an issue with the math I am using but I'm not sure... The program runs, b...
[1 reply] : Two problems: 1) the distance is sqrt(x*x+y*y) on line 15 2) since you... (by ats15)
Bank Account
 
I am trying to understand what I am doing wrong. I have been able to eliminate some errors by reading topics. The not a class or struct does not make any sense ...
[7 replies] Last: Guarding the headers worked. Thank you so much, I can feel the tension... (by TenToesUp)
Weird arrows getting into strings
 
I'm working through Accelerated C++ chapter 4, trying to get the programs in the chapter working. In the following, the user enters their name and a grade, and ...
[9 replies] Last: Yes, but you are mixing things by thinking of it that way. EOF signal... (by Duthomhas)
Reading from file problem
 
Having trouble reading from a file. I have a text file that reads: 0000 0000 0000 1111 When I output the following to the console, the program reac...
[2 replies] Last: Wow, thanks Smac89. I was scratching my head for hours trying to fig... (by Moonraker101)
SDL function(Pollevent)
 
Line 9 and 10 are a bit confusing for me does line 9 show events which can be of any type such as closing the window if that's correct than why we write SDL_Pol...
[1 reply] : When an event happens (window is closed, key is pressed, mouse is move... (by Peter87)
by Sam99
Stack problem
 
I have a simple problem. The code doesn't run correctly and crashing. The problem is in main(); in second loop. While it tries to pop out the infos, it crashes....
[9 replies] Last: Its really a nice explanation. :) Now I understand, I just need to dec... (by Sam99)
Can`t erase elements from vectors
 
Hello there, So I have been working on this calculator for a while just trying to make it better, today I took away some if statements and added a while loop so...
[15 replies] Last: To erase a vector, you can just use the erase member function: Myvec... (by IWishIKnew)
by slour
Isdigit
 
Does anyone know where in my code can I tell it to multiply the two values I'm receiving from the numbers integers? int main(){ ifstream indata; ...
[16 replies] Last: cire? (by slour)
SDL libraries
 
I am downloading library for sdl which ttf.lib it's of version 2.0 sdl and i have sdl 1.2.5 version will there be some problem
[3 replies] Last: Thank you brv this helped :) (by Sharan123)
by madger
String linked list trouble
 
I am trying to call my function list.getdata(10) which should return the tenth position in my linked list which has the word "what" it does but when I return th...
[6 replies] Last: Ahh ok, Thank you so much for your help! Linked list is a new topic in... (by madger)
While-loop skipping over lines
 
I'm working on a version of the game Connect 4. It's mostly working right, except for one problem. I'm using a while loop to control the game play. It works rig...
[4 replies] Last: Nevermind! I figured it out. It was because I was trying to call playe... (by dreaxbamf)
Double* <Unable to read memory>
 
I am using Opencv in Visual Studio 2012 with C++ in a Console Application. fastx and fasty are both pointers to image matrices, a cv::Mat. When i hit i=1194 fa...
[3 replies] Last: http://www.cplusplus.com/forum/general/112111/ A testcase consisting ... (by ne555)
Function Pointer issue
 
Solved
[1 reply] : Missing const in the linearSearch function header. Solved my issue. I'... (by Xilonian)
by engr
how to master C++??
 
I have done C++ and i have made CGPA calculation with it.. I need instructions about mastering it..
[2 replies] Last: thanks.. I read a lot.. but yet not mastered ... Recently i tried to m... (by engr)
Help with this code for smallest and largest
 
This is the code o found on the net: int max = 0; int min = 0; int arrai ; for (int i = 0; i<5; ++i) { cout << "enter value " << i << ": "; cin >> ...
[8 replies] Last: thanks for the struct code but i needed to try it myself first. (by closed account iAk3T05o)
by engr
increment problem
 
Write your question here. #include<iostream> using namespace std; int main(){ int x,m,n; cout<<"Enter m:"; cin>>m; cout<<"\nEnter n:"; cin>>n; x= ...
[2 replies] Last: yes thanks :D but the answer shows in textbook is 26..that's why I am ... (by engr)
by engr
can't execute (1,2)
 
#include<iostream> #include<conio.h> int main() { std::cout << "I am so so so changed "; } Failed to execute Why do i get it?...
[20 replies] Last: ye s :( I think that's the basic things to learn C,C++ as we have to i... (by engr)
&& Logic operator
 
Plz take a look at code - #include <iostream> using namespace std; int main() { int b = 0; cout<<(b && b)<<endl; return 0; } But after execution - a...
[6 replies] Last: sry cire...i mixed c++ with the one used in embedded systems...its lik... (by nomijigr)
c_str()
 
c_str returns a const char* that points to a null-terminated string i still don't get it can someone please explain to me giving simple example what is c_str() ...
[9 replies] Last: @Catfish it's visual studio express 2010 (by Sharan123)
January 2014 Pages: 1... 1011121314... 44
  Archived months: [dec2013] [feb2014]

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