Beginners - November 2012 (Page 72)

by mt0527
Reading .txt file into array. Bowling Game!
 
Hi guys, I'm working on a school project. Basically, I have a .txt file with integers in it. They are the scores of a bowling game. 9 0 3 5 6 1 3...
[3 replies] Last: What you could do is take out the cout statement in the for loop so th... (by Longazan)
Issue passing array to function
 
I have an array of test scores that I want to pass to a function and I think I have done that part fine but now im having an issue using the array in the functi...
[1 reply] : scores.size() is not a valid expression. If scores were a vector it m... (by Moeljbcp)
CREATE A FUNCTION
 
How can one create a function whose input is 2 strings ( representing an existing filename and a new filename respectively) And the function to be able to creat...
[5 replies] Last: Thanks but how can we make the whole program run? do u mind writting d... (by princesslumy)
return not working properly?
 
Hi, I am having trouble with returning a parameter from one of my functions. Can someone help? #include <iostream> using namespace std; int quotient(int n...
[2 replies] Last: Yup, I want it to truncate, thanks though it works now! (by rockclimber9up)
by guiyii
problem about void function
 
What's the problem of this code,I want to use this function to increment the value of win,but it doesn't work at all. #include<iostream> using namespace std; ...
[2 replies] Last: Thanks very much, I've stuck on this for a long time. (by guiyii)
by Feyy
Abstract Classes
 
I have an inheritance hierarchy with 4 classes as illustrated below: class A || \/ class B / / \ \ class C1 class C2...
[3 replies] Last: But you end with the same number of arguments. The setters approach wo... (by ne555)
Compiler error in dynamic array of structures declaration
 
Hey all! I'm currently learning C++ using Stephen Prata's C++ Primer Plus and loving the adventure so far. Well.. for the most part. Anyway, one of the progra...
[8 replies] Last: Ahh good catch. Ya, I meant to use the first. While a small program so... (by Raezzor)
write two integers adjacently
 
Hey if i had integers of 1 and 6 how could i write them as 16?
[1 reply] : either use a string or if you just want the displayed you could just w... (by codeman)
by smrt
Bad ptr error and dynamic memory allocation.
 
I thought I understood pointers. I really did. My code so far is designed to read a text file into a series of pointers and then put those pointers into a v...
[no replies]
Graphics in C++
 
Hi, I am using Dev C++ and noticed there is Open GL available for graphics as well as on windows application. However I don't know if its possible to do grap...
[no replies]
How can I define what I want to read from the file?
 
So how can I define what I want to get from a file? I was hoping for something like: #include <fstream> using namespaced std; int main{ string input...
[1 reply] : What is ctr? And won't 1!=2 always be true? Also, cin is itself a str... (by dawtsf1187)
Storing Fractions in an Array
 
I am currently working on an assignment using classes with fractions. I am almost finished but the last part of the assignment is to store 3 fractions in an arr...
[no replies]
Character Pointer
 
I'm not a complete beginner, but this question is trivial so it seemed appropriate to have it here. I am working on a roguelike being made with pdcurses and ...
[2 replies] Last: I received the error "StringFromInt" is undefined; I haven't worked wi... (by jim hurley)
by DanF22
functions
 
hi guys in my class we are getting to other functions besides int main. how can i create an 1) input function and 2) conversion function of this code that i wro...
[1 reply] : In user define functions there must be a returning value if return dat... (by shahbazsaleem)
palindrome function won't run properly
 
I have a function that i've got to write as part of a program. The function is designed to check and see if an integer is a palindrome (same forward as backward...
[6 replies] Last: that was why I was trying to use double instead of integer, so that w... (by jlmckelvey91)
No match for operator in 'std::cin <<input1' Won't compile.
 
Help guys, got this due in a couple hours and it is driving me nuts. I can't figure out the problem. I need to shift the values of 4 integers. I don't understan...
[3 replies] Last: Still having issues with /shift2/Debug/../shift_2.cpp:26: undefined ... (by guestgulkan)
Intro/ Program freezes during function call
 
Hello, i'm just getting started into C++ programming and during the course of learning have repeatedly looked to this community as a resource/suppliment for ...
[3 replies] Last: Next time this happens, run your code using a debugger and interrupt i... (by Moschops)
Code Validation Problems
 
Hey everyone, I'm working on a homework problem for my computer science class, and I'm running into a few issues. These issues exist primarily within my fun...
[12 replies] Last: Awesome! The code works beautifully! Thanks again! (by zeta4321)
what does 'undefined reference to class::class(int)' mean (where class is the class name))'
 
this is the error im getting but the question ive asked to work out the problem is on another thread, i have had the error message planty of times before with e...
[1 reply] : It means that class 'class' has no the definition of the constructor c... (by vlad from moscow)
Help on program regarding uppercase/lowercase
 
Hello, I'm working on a program that is supposed to: Convert uppercase characters to lowercase, and lowercase to uppercase. The program should display the char...
[1 reply] : Note: I realize I included <string> in my program. I don't think I nee... (by BloodMoney)
November 2012 Pages: 1... 707172737475
  Archived months: [oct2012] [dec2012]

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