Beginners - May 2009 (Page 14)

so i figure...
 
so i was wondering if any of you had some suggestions about a program i could write. i am out of college for the summer and i want something to keep me busy for...
[19 replies] Last: Now it sounds like a version conflict. Get the original compiler libra... (by Hammurabi)
if and Switch
 
if (choice == 'A' || choice == 'a') break; switch (choice) case 'A': break; case 'a': break; is there a better way for switch to work? li...
[4 replies] Last: He also forgot to put braces around his switch. But I figured that wa... (by Disch)
~Constructor
 
class apple { public: ~apple(void); } my request is: 1. do i still have to come out the Implementation on the constructor? if yes, how is it to...
[4 replies] Last: tks alot. =] (by littleimps)
by ocko
Searching a programing buddy
 
I just started programing in c++ and i wonder if someone is interested to join me. We would be speaking on skype and learning from eachother and so on! Hope s...
[no replies]
Concept: use a templated events to create list-like container access methods
 
I am going through "Accelerated C++" working on the chapter where you roll your own containers (chap 11). I tried modifying a simplified vector-like containe...
[6 replies] Last: Sorry Hammurabi, I was replying to kbw in my second post. I had just ... (by jetimms)
Alignment problem
 
Can anyone teach me how to align the part on the numbers in relative frequency ? My code go like this # include <iostream> # include <ctime> # include <...
[3 replies] Last: Very good point, Pan! (by Hammurabi)
allocator<T>::allocate(1) returns <Bad Ptr>
 
I am working on getting a program for Accelerated C++ (Koenig and Moo), chapter 11 running against earlier examples in the book. The following method's inten...
[15 replies] Last: Nice job! Just remember that it's generally not a good idea to trace y... (by Hammurabi)
String class and pointers
 
Can someone show me, or give me a link on how to use pointers with the string class? I've got a small program that i made a while back that uses c-strings and I...
[16 replies] Last: replying to the last post only... no.. string class has a member va... (by writetonsharma)
by Fuad
I've got an error
 
Please can anybody help me? I start to work on Visual C++ 2008 Express Edition and when i try to compile my first code the programm gives me errors: fatal e...
[1 reply] : go to project setting, there you will find a setting for use precompil... (by writetonsharma)
Accepting a set number of characters in Char
 
Hello there, Im trying to get my program to accept only the first 2 characters of an input from a char type. eg. char egstring = "This is an example"; ...
[1 reply] : http://www.cplusplus.com/reference/iostream/istream/getline/ (by mcleano)
delete a character
 
Hello.. I would like to know how i can delete an character.. is there any function or any command that i can use.. Thanks in advance!!
[5 replies] Last: You can make a loop and move the other characters when you find a comm... (by Bazzy)
by teppel
Pointer again
 
I am trying to create link list for my project. Basic thing is to set the header to NULL right. I don understand why all the tutorial i read through require me ...
[1 reply] : head is the first link in the linked list. Initially, when the list i... (by kbw)
by cge
What code is used to imitate the pressing of a key?
 
Say I wanted the computer to act in a way that opened the Internet automatically and performed a certain number of tabs, returns, etc. How would you do this, a...
[2 replies] Last: There's a good article here about simulating key strokes (e.g. tab or ... (by zeolite)
by murva
operator overload
 
I have the following: class Complex { public: Complex(); Complex(int r, int i);//r:real part i:imaginary part void printComplex(); Co...
[3 replies] Last: #include <iostream.h> class Complex { public: Complex(); C... (by arun1390)
How to Create File in Directory Relative to the Program itself
 
I want to create a file, for example, in the same directory as the program, instead of the current direcoty. And I don't want to use stuff like Win API. How can...
[6 replies] Last: Thank Bazzy, it works! (by lilydjwg)
by tan247
Do While Loop
 
I am trying to write a program that prompts the user to guess a number (has 20 attempts). The program is supposed to end after 20 incorrect guesses of if user g...
[5 replies] Last: Glad I could help. (by Mythios)
by teppel
set pointer to null through function
 
Hi all, i am new in c++. Need your help on the pointer topic. I want to set my pointer to NULL through function and make sure my main also retains the NULL val...
[5 replies] Last: void a(int*&ptr ) { ptr = NULL; } I second this method. ... (by Disch)
Wait function combines with simple graphics.
 
For my final project, I have created a memory match game. It is a simple visual studio project. I have completed all the code, yet I have this one last proble...
[8 replies] Last: Yea, that does. I had no idea about making objects "dirty" I had bar... (by Scubatoad)
by murva
Randomize inside a class
 
I am having some issues when I try to fill an array with random values inside a class. I have a ten elements array and constructor initalizes them, calling for...
[5 replies] Last: Add a private static bool in your class and initialize it to false. Th... (by Bazzy)
error LNK2019: unresolved external symbol, What to do?
 
Ok I was doing this program with an array of objects and this error bumps out 5 time but with different functions of the class being called wrong... I think...
[5 replies] Last: Show us the declaration and the body of setCategoría (by Bazzy)
May 2009 Pages: 1... 1213141516... 21
  Archived months: [apr2009] [jun2009]

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