Beginners - February 2017 (Page 20)

-nan(ind)?
 
So I'm writing a program that demonstrates Newton's method to find a root of an equation. It outputs the estimated value of the root, the the true error and emp...
[4 replies] Last: Your original routine newton( ) - your original post - does not return... (by lastchance)
by Mite
What happens when wrong indexes are used in c++2-d arrays?
 
HI everyone! I am a beginner of c++ and was doing an array program.I have entered the following code: #include <iostream.h> #include <conio.h> #i...
[10 replies] Last: Thanks very much everyone for their support and answer. (by Mite)
by LauTam
Unity help code keeps coming back with a error
 
Hello, somehow my code keeps getting a error in Unity. I'm a newbie in C++ so I have tried some alternatives and it didn't work. So if anybody can help me, I...
[no replies]
in visual studios '15, one of my classes isn't being recognized as a class
 
I'm attempting to make a composition of computer class with classes beneath/under it. All in header files. The computer class and processor class are recogniz...
[3 replies] Last: okay thank you guys for suggestions. I figured it out. Being a novic... (by Harryguy)
Code will compile but program won't work
 
It's not giving me any errors so I don't know why it's not working. It just crashes when I try to enter something. snacksJustString getQuant (int I) { ...
[3 replies] Last: Hello Robsome97, I finally managed to work something up and get the f... (by Handy Andy)
by Dagr
C++
 
hi guyz can u help me ? i want to write very siply program in c++, it must take a number in ranndom and multiply to 3.... so i want to know how to command to ta...
[2 replies] Last: thx (by Dagr)
how do i randomly generate 2 chars?
 
I want to generate 2 chars F or Q How do I do this? I don't want to print the whole alphabet.
[6 replies] Last: The rand() has deprecated status in C++ standard. The replacement is... (by keskiverto)
what's wrong with my program
 
hey guys, so I wrote a console game (I know, writing console game is a waste of time)...in order for the movement I use getch() so, I edit it and change it into...
[3 replies] Last: nvm, solved it (by Flaze07)
Trying to read a file in an array of chars
 
So, I'm trying to write a program wich reads the first line of a file "Test.txt", converts the string into an array of chars and then compares them to some sele...
[1 reply] : There is no need to mix std::string and char , you can use std::string... (by gunnerfunner)
Book for learning algorithms in C++
 
Hello everyone, I woud like to improve my coding skills in C++. I aready have a fairly knowledge of the language, but now I would like a book which basically...
[9 replies] Last: All: please be aware OP has a tendency to remove vital stuff from the ... (by gunnerfunner)
Function that returns a vector of sum from another vector
 
Hi, I have this code but don't see what's wrong with that vector<int> w; int sum =0; for (int i=0; i< n, i++) { while (v >=0) sum = sum+v ; w.push_back(sum) ...
[4 replies] Last: OP: you edited your first post 15 minutes after JLBorges' reply, remov... (by gunnerfunner)
Triangle ADT
 
Need high scores to pass this class. The lab says: Notice that for this lab, there are no methods to modify a triangle's side-length data members once it has ...
[3 replies] Last: I don't believe our instructor wants us to use the * operator ... not... (by gunnerfunner)
Buffer not writing correctly
 
I am trying to write FFFFFFFFFF to a binary file using a buffer size of 5. When I open the file up in a hex editor I get FF00FFFFFF. I cant figure out why. Here...
[2 replies] Last: I am trying to write FFFFFFFFFF to a binary file using a buffer size ... (by cire)
The Concept of this Practice Program
 
I have just completed Chp. 4 Sec. 15 of Alternate Version of Starting ourt with C++ Third. A checkpoint question is asking me what the program will display, but...
[2 replies] Last: I don't think the program is supposed to do anything useful. It's just... (by Peter87)
Need help with cylinder surface area (for school)
 
Struggling getting the volume and surface area of a cynlinder for a school assignment. Anyone think they can help me? /*************************** * ...
[4 replies] Last: Now your formulae for volume and surface area are simply wrong. If you... (by lastchance)
by Podo
Creating adjacency matrix from two 1d Arrays
 
Lets see if I can properly convey the question in my head. I've been beating my head against the wall for the past few hours trying to figure out how I might go...
[1 reply] : Think I may have figured something out... for (int i = 0; i < nu... (by Podo)
by tNK
void function question
 
What would the difference between the two functions? they both work the same way I'm just trying to understand void functions better. The void function is still...
[1 reply] : The void function is still returning an integer number. void means t... (by integralfx)
How to remove one item from a linked list?
 
I had to write a program where the user enters a series of integers and I store those integers using a linked list, when the user enters -9 I stop recording the...
[7 replies] Last: if anyone is interest here is my code that works, yes it's longer then... (by idknuttin)
Is there an easier way to instantiate many objects?
 
My teacher once told me if I am using a lot of repetitive code chances are I'm doing something wrong or inefficiently. What I'm trying to do is create a deck of...
[4 replies] Last: No, it's just an object called card_template whose members suite, suit... (by helios)
Reading/Writing text file
 
Hi I have this question here, Write a program that reads data from a text file that contains information about the rainfall amounts during a specific period an...
[1 reply] : This is a start to tidying up what you have. #include <fstream> #inc... (by closed account 48T7M4Gy)
February 2017 Pages: 1... 1819202122... 37
  Archived months: [jan2017] [mar2017]

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