Beginners - May 2015 (Page 36)

Int's and doubles.
 
int n = 0; n = (3 / 4 * 4 - 21 / 7.0) * 2 + 10 - 3.0; cout << n << endl; So, I thought when ever you have an int + double = double? but when I put i...
[3 replies] Last: The type of the expression (3 / 4 * 4 - 21 / 7.0) * 2 + 10 - 3.0 is ... (by while)
by HG319
binary search tree method that visits all nodes with in range
 
Can someone help me figure which type of search this would be and how to implement it: Write pseudocode for a binary search tree method that visits all nodes w...
[8 replies] Last: I just did it by hand. (by fg109)
by HG319
Linked queue BST
 
I am given this assignment and was wondering if someone can help me with the add function. An important document is given to you and your job is to create an...
[4 replies] Last: I am going to show you what I have so far in the main file. Here are a... (by HG319)
Tricky question, correcting an array
 
Hey guys.. I'm making this simple program to calculate correlation coefficient I've a problem here: when I enter values of array, I sometimes mis-type a nu...
[4 replies] Last: Thanks (by MostafaE)
by ka7xx
need help with struct and class
 
I wrote the program to the specifications: one struct that is then supposed to be inherited by two seperate classes. However I'm not sure where to go from here....
[2 replies] Last: Using Orwell, I made a little more head way. I still feel like I'm goi... (by ka7xx)
HELP
 
Why dont i get 150? I get a really big number. #include<stdio.h> int main(){ int i, req = 0; int R = { 10.00, 20.00, 30.00, 40.00, 50.00 }; int *P...
[3 replies] Last: no, no, don't take out the printf, just change the &reg to reg in ... (by Gamer2015)
If you delete an object pointer, will the pointers in the object be deleted?
 
class X { public: X() { y = new int; } ~X() { } int* y; }; int main() { X* x = new X; delete x; //is x.y deleted/freed from memory? } ...
[4 replies] Last: "There is a rule in C++, for every new there is a delete." Is this al... (by Gamer2015)
HELP
 
Can you help me figure out why the code wont display the value of req. It just displays the printf statement. #include<stdio.h> int main(){ int i, r...
[4 replies] Last: show me your new code please, it works fine over here: http://cpp.sh/3... (by Gamer2015)
Need help with temperature program that involves arrays and functions
 
Hello everyone, this is my first time on this site and my first post. First off i am taking a c++ class because i need it to continue with my engineering degree...
[14 replies] Last: Thanks everyone i got it. (by joe green)
Word Jumble that doesn't choose the same word?
 
Hello i'm new to C++ and i'm a student studying game art & design taking a basic C++ class this quarter. Recently my professor gave us word jumble game assignme...
[1 reply] : put srand over the Newword block. And please, I beg of you, don't use... (by Gamer2015)
Engineering Notation vs. Scientific Notation in C++
 
I'm studying electronics in school right now, and I want to create a program that will tell you the value of a resistor. Ive looked up a few examples to help me...
[4 replies] Last: I'm going to do some more research,and come up with a plan. I always d... (by ZeroSploit)
Lines of zeros when reading from file
 
I am trying to read the following information from a file: Dean DeFino 88 98 99 Sally Johnson 78 89 82 Bill Benny 75 79 81 Thomas Billows...
[4 replies] Last: But it is okey to use ifstream? Interesting... Well: When reading the... (by Gamer2015)
Having trouble with adding/sorting/searching to an array of a class.
 
Hi, I am having some trouble with this project that requires me to display a menu and then allow the user to select if they would like to add to the patient lis...
[1 reply] : The answer is pretty simple: This is your function decleration: int ... (by Gamer2015)
by MRQ1
Assembler
 
I am trying to learn a bit of assembler as it might improve my programming skills and make the concepts of pointers more clear but should I use a high level ass...
[1 reply] : Uhm... I don't think you can improve your understanding of pointers by... (by Gamer2015)
Segmentation Fault Error
 
Getting Segmentation Fault error when adding a second Linked List to an existing Linked List. Any ideas why the error is being caused? template<class ItemTyp...
[1 reply] : This code looks fine to me, the problem is somewhere else (by Gamer2015)
Removing an element from an array
 
Hello, I am looking to implement my own Vector ADT and I am currently assigning "0" when the method push_back is called. How do I make it so that instead assign...
[2 replies] Last: Hello keski, I have modified the post to reflect your query. (by decoy98)
Best way to pass arrays for maps of different sizes?
 
I want to each "level" like Pokemon; each "room" has a different size/shape as another. I'm not sure a 2-d array would be best for this because you can't pass i...
[1 reply] : I have no idea what your question is but the answer for dynamic array ... (by Gamer2015)
Structures and Array HELP PLEASE
 
I'm trying to construct a program where I grab a text file from the computer and use ifstream to input it into the program. There would be two text files contai...
[1 reply] : Next time you post, remember to put your code [co de] inside the code... (by fg109)
Bracketing Search in c++
 
just started to learn programming recently and i wanted to do some excericises, i came upon this list http://www.cplusplus.com/forum/articles/12974/ and as the...
[1 reply] : To guess in 7 tries or less, you need to apply binary search. This is... (by fg109)
by Dancho
bytes from decimal number
 
Hello! Can I instantly take stated bytes from Dec. number. Ex: 1339 dec -> 101 0011 1011 bin and take only bytes from 3 to 6 -> 0011
[2 replies] Last: Thank you, but what are these methods. The purpose is to take bytes x ... (by Dancho)
May 2015 Pages: 1... 3435363738... 40
  Archived months: [apr2015] [jun2015]

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