Beginners - April 2011 (Page 43)

Trim a line
 
Very, very new to C++ and I have my first project. I have a file that I need to read in, and cut off any line over 1000 characters at 1000 characters and out...
[3 replies] Last: http://www.cplusplus.com/reference/string/getline/ http://www.cplusplu... (by Athar)
expected primary-expression before
 
Hello All! I am new to this forum, and I am looking for a little bit of help. I have the following code that is continuously getting the same errors. I am sure...
[4 replies] Last: 8-0 Wow I messed up on that one! (by Computergeek01)
Simple code not working
 
I have been learning c++ for about an hour now and i have produced this code. It is meant to print the number 7 in the command prompt but it does not and i cant...
[9 replies] Last: That worked perfectly, thank you. And yes i am following a tutorial X... (by frolacosta)
Class values
 
I'm learning about classes at the moment, and I'm working on one of the exercises in my book. Here is the exercise description: Create a class called Triangl...
[4 replies] Last: Aah, of course! Thank you very much! (by Stupebrett)
C++ Number List visibility help?
 
I am using Microsoft Visual Studio Ultimate 2010, and I would like to know how do you make the numbers on the left side to appear, you know where you add a brea...
[3 replies] Last: Thank you. (by BLooDiEMuRDA)
by Solrac
Trouble separating Namespaces/classes
 
I have a project that I got working. But I can't figure out how to seperate all the classes in the namespaces to their respective .h/.cpp files. I don't know i...
[2 replies] Last: Yes the 2nd namespace is named csc350Lib_calculus_snle.h I want to t... (by Solrac)
Using an array from a file.
 
I half understand it but I can't find any examples online to help me with my problem. Essentially I'm trying to make a program that will read an array from a da...
[1 reply] : Use ifstream to read data from files: http://www.cplusplus.com/referen... (by Athar)
by Maerle
array of a class
 
book.h class book { string categoria; string titulo; string autor; int paginas; int edicao; ...
[10 replies] Last: 1) They need to be using the constructors like hanst99 stated 2) Your ... (by firedraco)
virtual function = 0
 
Hi everybody i have a question. Why is in this code class Body { public: virtual double Volume() = 0 { } virtual double Surface() = 0 {...
[11 replies] Last: This is what I mean (although I have not sen it in practice) class Ba... (by guestgulkan)
Function member pointer?
 
Is it possible to create a function pointer inside a class?
[2 replies] Last: youve just saved me a time of painful experiments (by Blessman11)
Changing number to string in guessing game
 
I've only been programming in C++ for a few weeks. Now, I have a project that the teacher has given little information about for Visual Studio 2008 in Win...
[11 replies] Last: So how can I get it to work? Like I said, we were coding in C++, and ... (by shiyongseng)
SDL - Rendermap
 
Hello, I am writing on a function that is going to render my map but somehow it is not returning anything. I have really no idea why it is not working. All t...
[2 replies] Last: Yes you are right about the prototype and I see what I did wrong. Pre... (by Kelevra)
Program with Virtual Functions crashes when run?
 
Hi, i've made a program for a college system which allows users to enter in student details and view the grade levels of the student. I have used a base and der...
[2 replies] Last: Oh yes of course, that works now thanks. (by maxg316)
by niku
Traking ir-leds
 
Hi! I am a total newbie to programming and just started using openFrameworks. So I am in a desperate need for some help! So I am doing a project where I need...
[1 reply] : anyone? (by niku)
by caneta
Iterate on an array inside a vector
 
I have a vector of normal C arrays. What I want to know is how can I access each element of every array? Example which does not work (only to understand the l...
[2 replies] Last: Thanks! (by caneta)
by caneta
Access a method variable from another method
 
Is it possible to do that? For example, is it possible to write something like: class A { public: void method1(void) { int a = 1; ...
[4 replies] Last: Ok, thank you! (by caneta)
Loop and other questions.
 
Lottery style winner selection I want to loop it from radom() back to prize()....how would I go about doing that? Also is there an easy way of making sure m...
[no replies]
Hamiltonian Question
 
Hi there, I've got a question to ask regarding Hamiltonian problem. I'm doing on a simple question below: State equations ODE:- dy/dx (t) = x2(t) d^...
[no replies]
Classes, functions, and manipulating ifstream data
 
I've got a task whereby I need to take information from a file using a function within a class, then depending on the nature of the information pass it to one o...
[10 replies] Last: Thanks, that helped. I've made a few bigger changes so I'll mark this ... (by rassilon256)
Pointers in "Battleships"
 
Hi all, For a university assignment I have to create a version of "Battleships" in C++. The module I've taken is entry-level programming so I am pretty much a ...
[no replies]
April 2011 Pages: 1... 4142434445... 55
  Archived months: [mar2011] [may2011]

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