Beginners - June 2011 (Page 15)

by ascii
Base Class Undefined
 
Hey guys while working on some SFML stuff I've been getting an error I'm baffled by this one error, even after some internet research. The relevant pieces of c...
[2 replies] Last: *hangs self* Thank you... *hangs self again* (by ascii)
by chipp
recursive function
 
can anyone tell me what's happen in the recursive function so it appears like this: #include <iostream> #include <string> #include <conio.h> using names...
[1 reply] : You call the function three times (recursively or no), so the cout sta... (by Zhuge)
by chocIC
Using array with pointers
 
Hi, can anyone show an example of a program with arrays, and char functions? Like for example, the function is char nameFunction (char a, char b) and c...
[1 reply] : These may help: http://cplusplus.com/doc/tutorial/arrays/ http://cplus... (by Zhuge)
by tonnot
How to write a template using header and implementation
 
I have the .h and cpp files for my class and : template <class TT_1> void write(TT_1 value); Where I have to write "template <class TT_1>" at header fil...
[2 replies] Last: Well, you can have the definition and implementation in two separate... (by shacktar)
windows & web applications
 
hi what is the purpose of windows and web applications and when we use this applications. What is the difference between these. Can you explain with examples ...
[2 replies] Last: An "application" is a generic term for a process that can be loaded in... (by Computergeek01)
My code is repeating a part I don't want repeated...
 
This is my code: cout << "\n Your rival appears! What is his name?" <<endl; cin >> rivalname; cout << "\n " << rivalname << " would like to fight! Send ...
[12 replies] Last: Alright thanks, I appreciate your help. (by iggysmartbomb)
by sebgar
stdafx.h
 
I downloaded an example for a program but when I try to compile it I get an error that some headers are missing. I have the file stdafx.h, but for all the head...
[8 replies] Last: stdafx.h is trying to use stuff for VC++ to make your code worse. Sinc... (by LB)
by jnco6x
extracting an A+ from a line of mixed data
 
i have a problem that i need to read a file that has data arranged line by line like this: firstname lastname A+ the names are all different as wel...
[2 replies] Last: Once you know how to read a file line by line, then really all you hav... (by shacktar)
Problem returning an object in an overloaded function
 
http://codepad.org/WaSOKsu8 There are a few functions with this problem, but a good example of one is at line 248. That function is intended to receive 2 arg...
[10 replies] Last: I was about to ask the same thing guestgulkan . You should be editing... (by Mathhead200)
Dynamic array of struct into a struct
 
struct subContainer { int sCint; string sCstr; }; struct mainContainer { .... .... struct subContainer *p2sC; .... } mCinstance; mCinstance.p2sC = n...
[2 replies] Last: Code with syntax errors will not compile (unless the syntax is valid j... (by Mathhead200)
by ty98
Text file
 
Ok so can sombudy show me how to make a text file with a program?
[1 reply] : #include <fstream> int main() { std::ofstream os("file.txt"); os ... (by Athar)
by Ernest
Sum of digits (1,2)
 
Trying to Create program definition for sumDigits Function. Function will receive and return an integer. Main Method Ask for input for numerous no...
[21 replies] Last: I don't really see the recursivity, does the function call itself? Als... (by GisleAune)
copy first n letters of string
 
Hello, I am attempting to copy the first n letters of a string into another, and the output is not what I expected based on the constructor. #include <...
[3 replies] Last: That worked great! Thanks for the quick feedback. I double checked m... (by thephysicsguru)
Getting Image Dimensions
 
Hi all, Having not looked at any code since graduating from university 8 years ago, i'm feeling rather rusty with my C++! I'm trying to write a program that re...
[3 replies] Last: Oh yes, I remember now. Magick++ is a real pig for getting the librari... (by Moschops)
by clarkk
Re-write for loop to make it run quicker??
 
hello, is there anyway to re-write this loop to make it run quicker?? // All variables are integers for (j = 0; j < num_c_symbols; j++) { LT_c_symbo...
[4 replies] Last: Replace i++ and j++ with ++i and ++j. Maybe replace the first nested ... (by moorecm)
Problems with modifying lists
 
I have a class that I posted here. It's called FileReader. It is supposed to read in a file and generate a list of integers. It may be useful to know that the l...
[2 replies] Last: Ok I'm changing the list, but instead of me replacing the lowest score... (by tam0009)
Typedef struct saving
 
Say I have a typedef struct with different variable types within it, it also looks at outside constants to determine which to use, a common struct, nothing fanc...
[2 replies] Last: Wasn't aware of a copy, I'm rather new to C and coding in general. So ... (by aerowenn)
help tracing a program
 
Hello, i would like to know how this program is being trace step by step. i know the first thing that will be print is output first 3 5 second ...
[1 reply] : Write down the values of e and f after each line. #include <iostrea... (by hamsterman)
the scope of a class within another class
 
Hi Given that class B is defined within class A, does B have access to the private members of class A? Thanks a lot Soheil
[2 replies] Last: I see. Thanks a lot for your help :) (by soheilghafurian)
by jjzpgg
Collatz Conjecture
 
Hi all, I'm trying to write a program in C++ which tests the Collatz Conjecture. The Collatz Conjecture states that you start with a number, and if that num...
[6 replies] Last: Tested it and it works like a charm :) thanks again! (by jjzpgg)
June 2011 Pages: 1... 1314151617... 41
  Archived months: [may2011] [jul2011]

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