Beginners - February 2014 (Page 21)

Secant Method
 
Im supposed to be finding the roots on a function using the secant method. Im pretty sure i have the equation right but it isnt giving me the right answer. The ...
[2 replies] Last: Thanks for the help! Turns out I had the wrong variable with >= tolera... (by megascruples)
by icegb
Problem with Code::Blocks 13.12
 
Hi, I started learning C++ recently, using code::blocks 13.12 and and I have to face a weird problem: every time i write a program and run it, the first tim...
[2 replies] Last: Thank you very much, problem solved! (by icegb)
Run-time check failure #2:Stack around the variable 'slot' was corrupted.
 
I'm running this code but I'm getting an error that I can't seem to fix. However, my code compiles and I get an output, but it is incorrect. #include<iostr...
[2 replies] Last: Thank you for the quick reply. So would I set the slot array differen... (by Ali9289)
Run time Check Failure: The variable being used is not initialized
 
I'm not sure why I'm still getting this error I thought I initialized fourteenPercent correctly but when I run the program it comes up with a run time check fai...
[1 reply] : If copiesSold is 4000 or less, tenPercent will be initialized but ... (by long double main)
pleaseeee help me what is my mistake
 
Tell me what is wrong please I have got headache with it already i cant fix problem help please #include <iostream> using namespace std; int i,h,m,s,m...
[2 replies] Last: thank you very much :) it worked Edit: No, in fact i need it for my ho... (by NikaTheKing)
weird constructor error
 
So I'm trying to make a class (called 'collection') which will have an array of many objects of a different class(called 'star'), but I'm getting an error on th...
[6 replies] Last: Line 25 in the OP's code is a function declaration. struct star { ... (by cire)
Remove copies in an array
 
Sorry I made a silly mistake
[no replies]
For loop problem
 
Ok so I'm trying to make a program which will tell that how many pancakes 10 people ate indivdually. But I can't seem to understand that why is 'y' not incremen...
[7 replies] Last: #include <iostream> using namespace std; int main() { int x... (by Chriscpp)
Troubles with getting random number inside "while" loop using structures.
 
Hello everybody. I'm writing a program (actually a game) about fighting with opponents on the arena. The problem is that I get always the same random numbers on...
[2 replies] Last: Thank you for help, your reply gave me a point. But I managed to do it... (by Endriu Golara)
by Alby94
Auto specifier
 
Why cannot deduce the type? vector <int> vec; auto Itr = vec.iterator (); Source code: http://www.cprogramming.com/c++11/c++11-auto-decltype-retu...
[2 replies] Last: The method iterator() of vector's template do not exists.. (by Alby94)
Arduino serial communication
 
I am using a very simple bit of code to write to a device and get the result back. i.e. I send ?T and receive xx.xx CR NL The code is working i.e. sending wha...
[6 replies] Last: atually that sounds like an good idea so I could set up 3 led digits (... (by davelaser)
what will be the output of the following lines of code
 
I was asked this question in a technical interview and i was not aware about it. Please help me to understand this code. #include<iostream.h> int main() { ...
[2 replies] Last: Did they give any reason why they were expecting you to know such poin... (by MikeyBoy)
by Dcull
Inheritance and Member Function Overloading
 
Hey Guys, So, just for full disclosure, here is the full question I am working on: a. Start with a Point class to hold x and y values of a point. Overload ...
[11 replies] Last: undefined reference to `Circle::Circle(Point const&, double const&)'... (by kevinkjt2000)
String matching code
 
I need help with a code that gives the closest match to a given string of data-the string being a mix of char and int types. Can anyone give me some direction. ...
[2 replies] Last: See: http://en.wikipedia.org/wiki/Levenshtein_distance http://en.wikip... (by JLBorges)
Zeile einlesen Anzahl der Zahlen ohne Whitespace
 
Hallo, ich möchte gerne von einer eingelesenen Zeile wissen, wie viele Zahlen dort vorhanden sind. char Eingabezeile ; z.B Einlesezeile: " 101 ...
[1 reply] : Dafür kannst du strtok() verwenden: http://www.cplusplus.com/refer... (by coder777)
prime number program doubt.
 
Q1 for(i=2;i<=num/2;++i) //what does this full thing means??? If(num%i==0) this is the code from which u can find whether number is prime or not,but ...
[2 replies] Last: Thanks (by supershooverine)
Open and Analyze a HTML Document
 
Hi, so I am really having a difficult time with an assignment. We are supposed to use loops to open a HTML document where the user must input the name and then ...
[13 replies] Last: You will need to reopen the file somewhere between line 6 and line 12.... (by kevinkjt2000)
Square and floats please read
 
I made a program which is doing something but that is not important imoportant is that it is not "couting" for an example 46.00 it is 46, or not 50.00 it is 50 ...
[3 replies] Last: Try using the iomanip lib. http://www.cplusplus.com/reference/iomanip... (by BrotherFromAnotherMother)
Alternative to nesting for-loops
 
Hello all, I am writing a program, and right now there's one function which makes use of nesting (a for-loop inside a for-loop in this case). Now, I noticed...
[8 replies] Last: I'm glad I can say that this problem is now solved! Here's what I did... (by RemmyDZ)
Program won't work !
 
I don't know why is it not working. The program seem fine to me. All it has to do is keep saying " You didn't select the required number " until the user enter...
[13 replies] Last: Its working just fine now. I removed continue from the code added a wh... (by talhabhatti5)
February 2014 Pages: 1... 1920212223... 60
  Archived months: [jan2014] [mar2014]

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