General C++ Programming - December 2013 (Page 31)

Passing Pointer to a Function
 
I have this code: #include "stdafx.h" #include <iostream> using namespace std; void square_cube(float *x,float *y) { } int main() { flo...
[8 replies] Last: Thanks @Disch The pointers were tricky but I figured it out. Appreciat... (by brownjas)
A little help creating a 5x3 table
 
Hi guys I'm a bit lost on where to go with my table. I need a 5x3 table to take in 15 random digits. I'm not sure if what I have is even in the right direction ...
[no replies]
Display the largest and smallest valleys of an array?
 
Hi there, I am working on a c++ assignment and I need to display the smallest and largest values of an array called from a .txt file...but I don't know how t...
[2 replies] Last: Thank you so much, however that doesn't seem to compile..it has an iss... (by thatoneguyandrew)
Checking for full tree?
 
How would I check if a binary search tree is full or not recursively?? ?
[1 reply] : By full you mean perfect binary treee? How many nodes are in a perfec... (by Smac89)
by Popanu
Saving Array Data into Text File
 
Here's my problem. I have a program that saves all information temporarily into memory (into the array), however, I need a permanent save solution. I have t...
[5 replies] Last: I'm coming closer to a solution. I'll give you a heads up once I figur... (by Popanu)
<>Help with nested loops
 
#include <iomanip> using namespace std; int main() { int j,k,l; for(j=0;j<10;j++) cout<<"*"; cout<<endl; for (k=0;k<5;k++) { for (l...
[1 reply] : for loop syntax: for( initialization ; condition ; iteration ) ... (by Disch)
while loop keeps looping without getting input from user
 
struct stu_dat //outside main function { int rollno; char name , float average; }s1; char ans='y'; //inside main function...
[3 replies] Last: Because it leaves a trailing newline character in the input stream. Se... (by Smac89)
Can someone help me with this? I don't know why my code wont run...
 
My program will prompt the user for an input file that contains one line for each person to whom the Company provided service. Each line has the following val...
[no replies]
Removing largest item in BST tree?
 
How would I remove the largest node in a Binary Search tree? function prototype: boolean remove_largest(node *& root) { } I know that if there's no ...
[2 replies] Last: bool remove_largest(node *& root) { if (root == nullptr) return fals... (by Smac89)
Error C2059 and Error 2109
 
I'm not getting what it's asking for... I'm using visual express for c++ #include <iostream> using namespace std; #include <math.h> #include <fstream> ...
[3 replies] Last: I also noticed that the relativeHumidity is an array, but the funct... (by Sirolu)
Error C1083
 
I'm not making the program do anything useful right now, just trying to get it to compile. #include <iostream> using namespace std; #include <math.h> #includ...
[1 reply] : The header is called <fstream> ... not fstream.h Likewise, if you're... (by Disch)
string with a name , variable?
 
What does the inv mean? string s="hello", inv;
[1 reply] : That's just a second string called inv. They're just being declared on... (by Ispil)
flames match finding program. can anyone reduce it's no of lines?
 
//flames programming using pointers #include<iostream.h> #include<conio.h> #include<string.h> void exchange(char *,char *,int,int,int,int,int *); int main(...
[1 reply] : Why would you want to? The code is such an unreadable mess that nobod... (by doug4)
One dimension dynamic array
 
I need to create a main function with a one dimension dynamic array with float data type. The total number of array elements must be controlled by a user input ...
[6 replies] Last: @Zhuge Okay, Thanks. I just wanted to know I if it was some type of co... (by brownjas)
ascending integer conditions not always met
 
Hi all :) I wrote a code to ascend any three integers. Problem is the code does not output the numbers in ascending order all the time. What am I doing wrong? h...
[2 replies] Last: thank you Disch (by patchouli81)
Star Search Output issue
 
Hi all so I was writing a star search program, also known as the talent show program. My issue is I keep getting a zero for my output no matter my input. I put ...
[1 reply] : The reason you always get '0' is because you never call the calcScore ... (by doug4)
If & Else if issue.
 
I have an incomplete program to solve different variations of the Bernoulli Equation. However with my if & else if statements It seems like it isn't computing t...
[6 replies] Last: 1 // va ... this is the value I am looking for 10 //vb .1 //pa .2 ... (by stumbled999)
about void pointer
 
how can i add the variable adress to a void pointer inside of a class? class variant2 { private: void *Vvariant=NULL; public: ...
[4 replies] Last: Because a char is not a string. And because integers are not stored i... (by Disch)
Inheritance & Polymorphism help
 
Hi everyone, I am going to be flat out honest with you guys. My brain is totally fried and all I type now is just a bunch of words.. :/ I have a quiz due ...
[13 replies] Last: Awesome!! I've changed those two and that works perfectly!! Thank you ... (by bandora)
project ASCII code program
 
hello guys i need help with a program please it is due tonight and im not able to do it!:( CRYPTOGRAPHY The science of developing secret codes has in...
[1 reply] : What code do you have so far? (by thiskid)
December 2013 Pages: 1... 2930313233... 37
  Archived months: [nov2013] [jan2014]

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