Beginners - April 2014 (Page 64)

Pointers/array/function problem
 
a) Write a program has a declaration in main() to store the following numbers into an array named rates: 6.5, 7.2,7.5, 8.7, 8.6,9.4,9.6,9.8,10.0. there should...
[1 reply] : Line 10 should be: show(rates); Line 19 should be: y ... (by AbstractionAnon)
by Ram1
Can someone help me with this question Please?
 
How to write a function that receives a double array along with its length. if the number of elements of the array is odd the function returns the number that i...
[1 reply] : I am in a good mood so will give a framework of how this can be done. ... (by CodeGazer)
NOT WORKING AS EXPECTED, HELP PLZ
 
what is the error here? it is always outputting that it is not a palindrome. why? void palindrome (string s){ int get_middle, middle; int word_size = ...
[16 replies] Last: thank you so much bro :o, thanks keval :D (by closed account ivDwAqkS)
Class and modifiable value
 
I'm practicing writing classes from scratch and I'm running into an issue creating a function that does something beside get a value from a the private/protecte...
[2 replies] Last: yes, that's exactly what I want. Sometimes the answer is so simple. Th... (by masschamber)
Days until next birthday
 
I am having trouble writing a program that computes the number of days until the user's next birthday. Is anyone able to help? #include <iostream> usin...
[1 reply] : You have the basic pieces you need. You need to compute the serial... (by AbstractionAnon)
Is the std namespace split into many header files?
 
Before knowing that the declaration of namespace can be split, I had the question that why I can use some entity defined inside the namespace std but not the ot...
[10 replies] Last: I previously thought that each library headers are implemented in its ... (by Nikko YL)
Return an object from a function and the copy constructor
 
I have written a simple program to study the copy constructor. But the output seems strange to me. Please help me figure it out. #include <iostream> us...
[18 replies] Last: Thanks all for giving detailed explanation. I will take a look at the... (by Nikko YL)
ANALOG CLOCK on TurboC++. Please suggest for improvements
 
Please suggest how can i improve this program. #include<iostream.h> #include<iomanip.h> #include<math.h> #include<conio.h> #include<graphics.h> #incl...
[1 reply] : Please suggest for improvements Don't use an obsolete compiler. ... (by AbstractionAnon)
C++ Class program problems
 
I am writing a program with a class and I don't understand what i am doing wrong, where am i messing up my code? #include<iostream> #include<fstrea...
[11 replies] Last: Well if your separating then it goes something like this (using my e... (by Codermik)
by mjlohr
Help with program
 
Could you please help me out with this? A sweatshirt manufacturer wants to take inventory of the college logo sweat- shirts that it has in stock. The c...
[2 replies] Last: Not specifically. I just need help with the overall program in C++. (by mjlohr)
remove all occurrences of a given character from a string.
 
leighton > I'm leighton and I would like your help with programming leighton > as im struggling to create a program which removes a certain character from a s...
[2 replies] Last: thank you, really means a lot appreciate it and it works well.... (by leighton)
by Walbo
I need some help ...
 
Have i written this program right? If not, please improve it. :-) #include <iostream> using namespace> std; int main(void) { int i; int og; ...
[10 replies] Last: Thank you sooooo much !!!! :-)))))))) (by Walbo)
Set Variables to 0?
 
Why would you set the variable to 0? What does this do? Here's an example: #include <iostream> using namespace std; int square(int num1, int num2); ...
[6 replies] Last: Awesome! You guys are all awesome. Thank you very much for clarifying ... (by uchi240)
I need help finishing my program
 
I am using visual studios 2010. my program runs exactly how I want it to and now I want to save it so it is easy to run the program without having to open VS. I...
[1 reply] : Your program is already a full fledged exe. Depending on how you compi... (by coder777)
Finding duplicates in a List
 
solved
[1 reply] : Does this give you any ideas? http://www.cplusplus.com/reference/algor... (by keskiverto)
by mdeeza
copy constructor issues HELP
 
Hello. I'm currently wrapping up on a project which uses a doubly linked list toolkit to work with a sequence class. During which I can't get my copy constructo...
[1 reply] : > test.sequence( ); // ERROR ON THIS LINE ¿what do you think you ar... (by ne555)
Implementing queue
 
I have made a struct Queue and now i want an object for Queue but it says it doesn't not have storing capabilities , It works when i try to make it in function ...
[5 replies] Last: [quote=Sharan123]Swap function will not be called. The swap function ... (by cire)
Converting Function to a Recursive Function
 
Hey all. So the code I am posting works fine, but I am unsure how to make it recursive. Anytime i change the return to "return collatz(n*3+1)" or "return collat...
[8 replies] Last: Good. I bet your solution differs from this: void collatz( int n ) {... (by keskiverto)
bool Stack::Empty() function not working?
 
Hello, I am currently implementing a class Stack Linked List and my Empty function seems to be unable to return a true value when the Stack has no Nodes and ...
[3 replies] Last: It looks OK to me. Could you post a small example of making an empty s... (by Zhuge)
Issues with std::runtime_error?
 
Hi, I keep getting an error saying " terminate called after throwing an instance of 'std::runtime_error' what(): The vector can't be empty! " Then, my exe...
[2 replies] Last: Hm, I think something might just be wrong with my compiler because I t... (by ECEsasha)
April 2014 Pages: 1... 626364656667
  Archived months: [mar2014] [may2014]

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