Beginners - April 2014 (Page 14)

by rshoe
Total bytes for fields in Structure
 
I am trying to find out how to get the total bytes for the fields in a structure. Not including overhead. If anyone can help me I appreciate it. R. Her...
[9 replies] Last: No, not really, because all computers have different architectures, di... (by TwilightSpectre)
Help With Template Class Declarations
 
I'm getting this error "Error 1 error C2955: 'ONE' : use of class template requires template argument list " and i think it's because of something I'm missing i...
[4 replies] Last: Thank you for that. I will look more into getters but so far I seem to... (by luiscovar)
operator const trouble
 
I am working with code from a book. I am getting errors in vim and xcode from a direct copy of the code. const Money operator +(const Money& amount1, const M...
[3 replies] Last: Aah, I worked it out: This is why you need to show us your code in cod... (by TwilightSpectre)
is my compiler bad?!
 
first of all: i use code blocks with gnu compiler, is that bad?! and creating problems?! so i was just starting to make a program (my teacher says i am too dum...
[10 replies] Last: You need better variable names. What are x y, z, N1, and N2 supposed t... (by giblit)
by bozz51
Call by reference
 
Hello, I have a file data.txt that has these set of numbers: 126534 9 8 10 321345 7 3 5 324341 9 9 9 I'm trying to create a call by reference that will use...
[10 replies] Last: Thanks so much giblit (by bozz51)
by cozier
Help With Classes
 
I was given a shell program and the only instructions given were to write the 13 functions. I am having a hard time trying to figure out where to even start wit...
[6 replies] Last: This is what I have added, I can't figure out how/what to put in the o... (by cozier)
Why does my program give me the wrong output?
 
I want to make a program that takes a string called, "name" and break it up into 3 different strings. #include <cstdlib> #include <iostream> #include <s...
[11 replies] Last: I now have the entire program my teacher wants complete, Thanks! I ju... (by Jimmy22)
Looping two functions
 
I am having trouble looping two functions as shown below... It checks vowels fine, but after it finds out that there is an repeated letter, it ask u to enter an...
[3 replies] Last: Well, I am trying to create a custom wheel of fortune game. Not fully ... (by dasboshiet)
Function to create object
 
I have declaring instances of my equipment class everytime I need to use it. Is there a way I can use a function to do it so I don't have to remember everytime ...
[3 replies] Last: Do you mean something like this : // ... sword* player::createSwor... (by nvrmnd)
Most frequent character function
 
Hello. I am working on an assignment for my c++ class and I need to write a program that accepts a c-string and sends it to a function that finds the most frequ...
[3 replies] Last: somebody corrected the algorithm that I found online so I was able to ... (by taylor5479)
password verifier
 
I have a homework assignment that requires me to write a program that asks for a password and checks to see if it is acceptable. The requirements for a good pa...
[4 replies] Last: Thank you! The problem was that I forgot to include an error message f... (by taylor5479)
by Naulee
How to compare Class struct
 
Okay so obviously I know my if statement is wrong, I was just trying to guess before posting here. The goal of this program is to print the default numbers, the...
[2 replies] Last: Thank you! (by Naulee)
Classes
 
Is there a way to get an array within main() to operate in a class (with private and public objects?) My input data with causing problem with the compiler. Cou...
[6 replies] Last: Here I've modified the code and added comments study this to see how i... (by CodeGoggles)
Problem with getline and file reading.
 
I am trying to read part of a text file and put first name and last name into a string variable. For some reason or another, this code isn't working: #includ...
[15 replies] Last: HOLY CRAP I'M SO RETARDED. The for loop in line 28 has it going 6 time... (by nathanward4739)
by Mido14
Dymanic Array
 
Write your question here. //why when we make dymanic array we don't write this code int row,column; cout<<"Number of rows : "; cin>>row;...
[1 reply] : Because that syntax is used for arrays allocated on the stack. Dynamic... (by helios)
by fi50
Binary Search Tree Assistance
 
Okay, I've spent about an hour looking at this and I have no idea why it won't work. The findElement function is buggy, sometimes it finds the value sometimes i...
[12 replies] Last: Windows 7 and MS Visual Studio 2013 which I'm pretty sure just uses th... (by fi50)
Help me please I can not find the error. Thanks for comments
 
#include <iostream> #include <string> #include <fstream> using namespace std; int main() { string aj; string b; while (getline(cin,b)) ...
[2 replies] Last: ofstream file ("D:\file.txt"); <-- Not gonna use that? if (file.is_o... (by ResidentBiscuit)
Slot Machine biased
 
EDIT: The "problem" is solved. Thank you for your help
[3 replies] Last: Please put your original question back in please. Might help other peo... (by mutexe)
by rshoe
Functions and Structures
 
I have to write two functions for a structure: #1 function which will return a reference to a Part structure and receive a reference to a Part structure. It ...
[2 replies] Last: Thank you JockX for your quick reply. I was able to solve the error. T... (by rshoe)
Having questions about coding C++
 
Hello, my name is tremain74, I may have to ask questions on programming a simple project of typing people's name and coming up with their address. I hope some o...
[7 replies] Last: I think it's more like a warning. I'm a little scared now.... (by crutchlen)
April 2014 Pages: 1... 1213141516... 67
  Archived months: [mar2014] [may2014]

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