Beginners - February 2014 (Page 15)

by Marnez
Selection sort by last name?
The current code below shows me sorting the string members of an array of structures in ascending order. I am sorting by the entire string, the entire name of t...
Feb 23, 2014 at 4:08pm
[3 replies] Last: Your selection sort algorithm only swaps the director's name not the m... (by Smac89)
by Manga
pass an array into a function?
I can pass a single dimension array into a function just fine, but I now want to know how to pass a 2D array into a function. For some reason I can't figure thi...
Feb 23, 2014 at 3:37pm
[2 replies] Last: laughing... guess which method I was trying to use. :P Thank you ve... (by Manga)
How to get compiler to recognize previous declarations
/** How would you get a class higher in the program to recognize another class that is lower in the program....? For example, "other class" hasn't a prob...
Feb 23, 2014 at 3:35pm
[6 replies] Last: Sorry for the late, late reply but thanks a lot. Definitely helped. @... (by dtaqee88)
What would you do?
Hello guys, My programming professor is insisting that we use the keyword const when declaring our function of a class for example: //in class header file bo...
Feb 23, 2014 at 2:45pm
[1 reply] : They're not the same thing. This allows a const instance of your obje... (by kbw)
Help with this finding the number of occurences of a character program
Okay, it works great and I am so close in solving this out. The only problem is that, it outputs the number value of the ascii character instead of outputting t...
Feb 23, 2014 at 1:32pm
[2 replies] Last: Why didn't I noticed that? But thanks, it's now working! (by carlplusplus)
by varx
Interface Classes
I am trying to understand interface classes. I am confused, because an interface class does not expose a constructor to the client, so how does the client init...
Feb 23, 2014 at 12:24pm
[no replies]
Please help me align this columns!
The program is about recording student's quiz scores with the use of arrays. Here's the code //code deleted The program works fine. But its output is lik...
Feb 23, 2014 at 11:58am
[4 replies] Last: Thank you very much! It's aligned now. :D (by EternalFantasy)
Removing from a bag
I'm learning to write a bag class and have written this code that adds elements into the existing bag. Problem is that once I return the bool type for the array...
Feb 23, 2014 at 9:55am
[6 replies] Last: You can do as Zhuge says but as I understand it the order of the eleme... (by Peter87)
by Marnez
Junk number in first structure member?
In my program, I initialize the timesCalled member in the struct Movie to 0, then make a dynamically allocated array of structs with, of course, all the structs...
Feb 23, 2014 at 6:28am
[2 replies] Last: I basically want to make all the timesCalled of the arrays to 0 becaus... (by Marnez)
static_cast and ( )
Hello everyone, im pretty new to c++ and i wanted to print out the address of a char sequence, and i heard in order to do that, i would first need to convert...
Feb 23, 2014 at 5:11am
[8 replies] Last: thanks! now I understand (by crpltripl3)
by dean93
Need help debugger says im missing }.
/code #include <iostream> #include <math.h> using namespace std; int main() { int index; double input1, input2, input3, output; bool quit, back, bac...
Feb 23, 2014 at 4:42am
[9 replies] Last: Thanks for the help (by dean93)
Linear Regression
I need help with my linear regression formula. I think I have most of the code correct but my result is off by a bit. It's reading from a text file. So here are...
Feb 23, 2014 at 4:35am
[1 reply] : First thing I would correct is the: for(i=0; i<=n; i++) in lines 54 ... (by ShodanHo)
Reading data from a file wit While loop
I need to read these numbers from a file: 2 10.5 5 20 10 30.2 It is not working. It skips over numbers. The first row (2,5,10) is supposed to be Hours and...
Feb 23, 2014 at 4:25am
[4 replies] Last: Perfect, Thank You So Much!! :) (by blazemadej)
by Allane
Addition program
When I output it gives me this: What would you like to do? 1. Addition 2. Subtraction 3. Exit 1 Enter a 4 bit binary. 0 0 1 0 Enter another 4 bit binary...
Feb 23, 2014 at 2:43am
[no replies]
by hcao
sapin
Write your question here. hello i want to creat a Christmas tree using c++ but it does not work what's my problem? #include <iostream> // Fonctions d...
Feb 23, 2014 at 2:15am
[no replies]
by leo255
Error on "Set" function for Struct (cannot convert ‘<brace-enclosed init>)
I apologize, as this is a pretty basic "set" function and shouldn't be so hard, but I don't understand the error. There is more code to the program, but I think...
Feb 23, 2014 at 1:26am
[1 reply] : This is because, even though you have specified that you are passing a... (by TwilightSpectre)
Loading Sequential Files
I'm downloading a a series of filenames and need to load these files into a matrix. When I request a new file name from my matrix of strings, I show an error t...
Feb 23, 2014 at 1:09am
[7 replies] Last: I found the answer in previous forums: two commands clear the file an... (by GBarOfAvn)
Console Memory too low
Hi I have a huge amount of data to be printed into the console (iostream?). Unfortunately, the first lines are always deleted. Does anyone know how to increase...
Feb 23, 2014 at 12:30am
[2 replies] Last: Thank you! i needed to read a bit about handles for SetConsoleScreenB... (by realcler)
by leo255
What's wrong with my Array of Structs Function?
Hello, I'm trying to create an array of structs, and to output the data, but I'm getting a whole bunch of errors that say that I have stray numbers (i.e. Err...
Feb 22, 2014 at 11:47pm
[3 replies] Last: Ok, I got it fixed now...Removed the "<< endl;" from line 28, and am n... (by leo255)
Last question!
I'm on my last question, and I have no idea where I start. I tried though. A bowling team consists of five players. Each player bowls three games. Write a C...
Feb 22, 2014 at 9:49pm
[3 replies] Last: #include <stdio.h> int main() { float averageScore; int bowler; i... (by Kevin15663)
February 2014 Pages: 1... 1314151617... 60
  Archived months: [jan2014] [mar2014]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.