Beginners - September 2014 (Page 12)

Pseudo-code to C for While loop
 
Hello everyone, I have some problems with getting this program to work. I can't get the loop right and it won't run as i wanted it to. I can write the basic s...
[1 reply] : This is a good start: http://www.cplusplus.com/doc/tutorial/control/ ... (by closed account 48T7M4Gy)
STACK-C
 
Write a program that imlements the ADT stack. 1.Push the elements -3.0,-8.0,6.0 2.Implement a POP operation that deletes the first two elements 3.Ensure...
[7 replies] Last: I'm not sure what you want. If you want to understand it, then the fo... (by kbw)
Triangle task (hints please)
 
Write your question here. Hi. I now face difficulties in a programming problem. I am required to write the codes of a programme which can display a triangle...
[5 replies] Last: try using a for loop? Maybe include a cout << '*' How would you do **... (by closed account 48T7M4Gy)
Strings and paramaters
 
I need the following program to run the functions I wrote.I struggle to remember how to let the printPay() get the variable fullname(struggle with strings). ...
[1 reply] : [code firstline=63]main(){ std::string fullname; float totalhours; ... (by MiiNiPaa)
Returning address of local variable Warning
 
Hi everyone~ Just wondering if someone can help me get rid of this compiler warning? On the "return a" line I've got warning C4172: returning address of loca...
[1 reply] : int a = { 0 }; This is a local variable. That meant, it will be des... (by MiiNiPaa)
When to use typdef and define
 
Can someone list the thought process one goes through when deciding on wether to use typdef and define...pro's and con's of each A snippet of code for examples...
[2 replies] Last: You should always prefer typedef or using over #define . There ar... (by TwilightSpectre)
Is there any good tutorial about handling BigInteger in C++?
 
I am a beginner. When I was solving problem I realized that I don't know the concept of Bigint and how to do operations with Bigint. Is there any good tutorial...
[3 replies] Last: Using it is easy, it's a drop in replacement for int. Implementing it... (by kbw)
Help with Objects, and Assignment
 
I reached the end of another chapter in a book I've been learning out of, and it gives me a step by step drill to test out. I thought I was doing good until the...
[14 replies] Last: Yes, I believe it should be part of the std::cout and you should just ... (by greenfox)
second largest factor
 
need to find the second largest factor but my function keeps returning 1 all the time. #include <iostream> using namespace std; int second_largest_f...
[4 replies] Last: i got it now man. anyways thanks for the help; appreciate it. this wa... (by ssandha)
location of (i, j, k) that has the maximum difference.
 
Hello cplusplus! I am trying to write a function that finds the maximum difference in a 3D array. So, I have a 3D array, I want to go through all of its eleme...
[5 replies] Last: Edit: nvm, your idea worked. Thank you very much! (by DeathLeap)
Student and Crash
 
Hello! I receive the crash when the main returns: #include <string.h> #include <iostream> class Student { public: Student() : defaultSize( 30 ...
[2 replies] Last: I thought that will be called "normal constructor" for ivan2 and then ... (by Observer)
color code
 
how to make statement..have different color... #include<iostream> using namespace std; main() { system("color 8a"); cout<<"hellow world"; cout<<"he...
[no replies]
program code help
 
What I'm most confused by is where I put the "while" and "int" statements. I think I have them in the wrong places. Secondly, I don't know how to make the pro...
[3 replies] Last: considering you used that method at the bottom of your code? I know i... (by hyperfine)
by clock
Requesting Help with Functions C++
 
Hello, thank you for taking a moment to review my first thread. It is nice to meet you all. I apologize if this is below any of you, but I would like to receive...
[2 replies] Last: Very helpful. Thank you for this. (by clock)
by bgmnk
Build Problem
 
Whenever I attempt to compile my program, an error message comes up: ||=== Build: Debug in filename (compiler: GNU GCC Compiler) ===| ld.exe||cannot open o...
[8 replies] Last: jlb, all I added to it was the do while statements. I had the rest alr... (by bgmnk)
arrays
 
how to shift negative integers first in array. i can do it with nested loop but the condition is that i cant use it. i have no idea how to do it without neste...
[no replies]
if you could help me with this function!!
 
Hey, pretty new here, would post more but don't have a huge amount to offer at the moment but I'm cracking the books so I can be a bigger part of the coding com...
[1 reply] : You could have an averageArray function(arrayName, arraySize) that fir... (by wildblue)
by Jhub
Using loops and rand function
 
Hello I am trying to create a program that will ask the user for how many rolls of a dice he would like to roll and then ask at what value he wants to hold at. ...
[8 replies] Last: #include <iostream> #include <cstdlib> #include <ctime> using std::... (by Jhub)
Not getting a value returned
 
I need this program to output the value of the bmr function. once i input height wieght and age nothing is happening. thanks in advance! #include <iostre...
[1 reply] : You need to tell the program to output the value. One way would be lik... (by admkrk)
Please help me simplify my code!
 
Hi. I am doing this assignment for my computer science class, and my professor said my answer was "too complicated", so I need to find a simpler solution to it....
[2 replies] Last: That's only there because I ran it through http://www.compileonline.co... (by Mroonie)
September 2014 Pages: 1... 1011121314... 51
  Archived months: [aug2014] [oct2014]

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