Beginners - March 2012 (Page 2)

by Runnaz
c++
 
c++
[no replies]
Passing an array address from a function.
 
Can anyone help me in printing the array of the function getIt() in the main(). The program is-- #include<stdio.h> #define MAX 50 int* getIt() { in...
[3 replies] Last: Thanks! It's fine now. (by albertmunda)
by Owain
Trouble with sine
 
Hello, I have to write a scientific calculator program and I'm not allowed to use any maths libabries (not even <math.h>) I am doing very well so far, but I'm h...
[6 replies] Last: { f_tempOperand -= 2 * f_pi; } while (f_tempOperand ... (by Moschops)
Getting a error because of #include <iostream>
 
I'm using CodeBlocks and I get a error saying that there is a mistake because of #include <iostream> here is the code. //This is a string lol #include <iostr...
[6 replies] Last: I tried #include "iostream.h" and it worked... This is because you... (by Moschops)
Help Me
 
I am using Dev c++ but it cannot support for STL programs it provides some error at the time map declaration and iterator declartion. Please Help What I do for...
[3 replies] Last: Your information about your code is pretty poor. Do you use std::map ... (by frema)
Integration and Differentiation
 
Just a quick question to ask: Is it possible to write a program to find the integration and differentiation of a given function? Say f(x) = cos 3x + e^x; Pleas...
[9 replies] Last: Yes, it is possible. Mathematika, MATLab, Derive and what else is out... (by frema)
problem with while loop
 
I'm struggeling with this while loop cause I feel they don't give me enough info. I'm suppose to write a while loop about the folloing info: Two variables: r...
[7 replies] Last: Yes, Rascal, you are right. As long result is smaller than 50 the loo... (by frema)
by ev66
return is empty
 
The following code compilies correctly, but does not reurn the string. Seems to be empty. Probably something obvious, but I can't see it. Please can any...
[4 replies] Last: Thats it. Working now. Thanks for help, and quick responses Breadman ... (by ev66)
by HOD
The second function ran before the first ...
 
cout<<st1.countTokens()<<' '<<st1.nextToken()<<endl; When I run this line is primarily performs the second function [nextToken()] then it is running the fi...
[1 reply] : The order in which arguments of a function calculated is undefined in ... (by vlad from moscow)
srand ( time(NULL) )
 
Can anyone tell me why srand is generally seeded with current time?
[2 replies] Last: thanks for the response... makes sense! (by DeepBlack)
Help, Using input to define 3 variables.
 
Hello, I am stuck on a problem I cannot figure out. For the problem I need to use input from the user (A number value which is how much gold they wish to spe...
[7 replies] Last: bin packing algorithms got it, thank you. (by Delusive)
Getting there
 
I'm getting close on this code and it worked fine until I added the while(true) loop(to put the whole program in a loop essentially). It goes through once but w...
[1 reply] : Firstly, you're missing an #include <string>. You need that to use th... (by Veltas)
function call isEqualTo - how to do this?
 
The driver program is calling this function which I need to write. It is called in two instances, one is: if (s.isEqualTo(emptySet)) the other is: if (evenset....
[3 replies] Last: You're welcome! Though, you should know that my brain is tired and ba... (by Duthomhas)
Double function
 
I have a double function and I'm wondering if it can return two values. if not how do i make a function that can. Here is the function: double requestRadi...
[5 replies] Last: is saved outside the function rather than being erased after leaving... (by chipp)
Compile errors when trying to create the classic 'swap ints' program
 
I have a program which is supposed to swap the values of two integers, but I am getting compile errors and don't understand why. Here is the code for swapInt...
[2 replies] Last: Awesome thanks for the quick reply tfityo! (by dmanniteaux)
calculating frequency of the numbers entered
 
I have to use arrays to sort the values entered from the smallest to the largest, and calculate the frequency of those numbers typed. But I keep having an error...
[1 reply] : You shouldn't need a condition with your else statement. It should jus... (by Stripeb49)
by Skyza
Need help with C++ program please
 
This is the question: http://i231.photobucket.com/albums/ee256/skymack123/zzzzzz.jpg And this is what it should look like: http://i231.photobucket.co...
[1 reply] : Can anyone please write this program for me? This is my first time ta... (by Skyza)
Help with Search and Sort Algorithms
 
I have an assignment that says "Your main function should call the function to input elements into the array, call the function to print the contents of the arr...
[no replies]
by hvigil
Help me with functions errors
 
i have these errors header.h(29) : error C2143: syntax error : missing ')' before '}' header.h(29) : error C2143: syntax error : missing ';' before '}' ...
[6 replies] Last: oh yeah thanks I had not seen that error I feel kind of stupid for n... (by hvigil)
stdlib Purpose
 
My teacher learned C++ when it first came out, so some functions and libraries he has shown us have been improved and/or deleted. In most of the examples he ...
[4 replies] Last: @youngcoder, If you're going to use EXIT_SUCCESS, you must include <cs... (by Cubbi)
March 2012 Pages: 1234... 71
  Archived months: [feb2012] [apr2012]

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