Beginners - May 2010 (Page 22)

by liac
bubble sort
 
Hi there, I am trying to get my head around the bubble search and even if it is pretty much clear how it works in theory, I have some problems when it comes do...
[3 replies] Last: I had a look at wikipedia already thanks, but the sort is done the oth... (by liac)
VC2008Express and SDL
 
Hello all. I've been trying to set up SDL 1.2.14 with Visual C++ 2008, and I followed these directions: http://lazyfoo.net/SDL_tutorials/lesson01/windows/msvsne...
[no replies]
by neoxyn
Chatbot -text gets double processed
 
I'm building a chatbot for an external chatprogram. However, if my input in the chatprogram is, for example "1", in the console window it gets double processed...
[no replies]
Lottery Generator (1,2)
 
I want to make a lottery generator and compare both of them together to see if the user is a winner or not. I think I'm on the right track but I'm getting an e...
[23 replies] Last: Look at your for loop: for (int x = 0; x < 1; x++) { if (user... (by closed account Lv0f92yv)
allocating memory and initializin array.
 
Dear forum users, I want to use a certain area of the memory to store some data as 2d arrays. The memory area should be always the same, it should be accessed ...
[2 replies] Last: Dear kbw, thanks a lot for the replay! Basically the mistake was not... (by tinauser)
destructor called twice for single object
 
Hi everyone, (This is my first step to interact and need your help for learning cpp) Inspite having only one object been created the destructor is been ...
[2 replies] Last: Thanks Null! (by santoshkb)
!isdigit woes!!
 
I'm trying to write a for loop that removes all the letters from a string. When I run it, it seems like the !isdigit function only removes a handful of letters,...
[3 replies] Last: This is what I have - NOTE that there is a correction in the loop test... (by guestgulkan)
Cin for validation purposes.
 
Right now I'm playing around with a lab for my c++ class and the teacher kind of threw me a bit of a curve ball. He wants me ensure that the user entered a le...
[5 replies] Last: Anything the user types is a char . You need to explicitly validate... (by Duthomhas)
Catching Exceptions with Struct
 
I am trying to create a linked list out of structs. I can do this with classes, though I am now trying with structs. Is there a way to catch exceptions when ...
[6 replies] Last: That does explain what I'm getting at a little clearer. Can I write me... (by closed account Lv0f92yv)
how to write to excel using C++
 
I am having trouble finding how to wright to excel from c++ and i am not understanding why some of the things that i find don't work.. i am wondering if you hav...
[2 replies] Last: ok thanks that helps alittle bit.. but i still dont know what to put i... (by bratgurl)
Tutorial Question to Pointer2Pointer
 
char1 = 's'; char_Pointer = &char1; char ** Ptr2Ptr = &char_Pointer; cout << "char1= " << char1 << ", and it's address (Pointer1)= " << char_Pointer; cou...
[2 replies] Last: Thanks! (by Selse06)
by fyodor
problem with ostream operator
 
Hello! that's my program: .cpp Tablica::Tablica(int rozmiar) { if (rozmiar<0) ; if (rozmiar==0) ; if (rozmiar<10) ; if (rozmiar>10...
[1 reply] : In your constructor Tablica::Tablica(int rozmiar) , you never initial... (by kbw)
by amma
printing values from multimap
 
Hello again, This little bug has been plaguing me for some time... I have a self defined type Derivation. The operator << has been overloaded and working ...
[6 replies] Last: Yes, problem solved! Thank you! (by amma)
by fyodor
operator= ...what's wrong?
 
Hello! i want to define operator=...and i don't know what is wrong! just look: .h class Tablica { private: int *bufor; ...
[2 replies] Last: thank you!:) (by fyodor)
Big numbers
 
I have just got an assignment about multiplying two big numbers using double linked list, although i try very hard but i can't find the best algorithm using lin...
[1 reply] : I assume you express the big number as a sequence of digits (it hasn't... (by imi)
by SoloXX
Multiple files - 2nd parameter advice
 
One little thing: it seems "size" is not the proper parameter to use as the 2nd parameter in Main.cpp as it's a formal parameter in funcAverage.cpp. I didn't th...
[4 replies] Last: You shall calculate average outside of loop. And you shoudn't make... (by Dufresne)
by zuheyr
ifstream seekg error
 
Hello, I want to scan for some strings in a file. I open the file using ifstream, read the line with getline and seek the string with string::find. The s...
[6 replies] Last: Hello, Galik, thank you very much. Yes, adding File.clear(); works.... (by zuheyr)
switch statement doesnt work!!!!
 
#include <iostream.h> #include <iomanip.h> void main() { int dir=90; float fah,cel; cout << "Type 1 to convert Fah to Cel,\n 2 to convert Cel to Fah...
[1 reply] : dir is of type int, but in the switch statement you treat it as if it ... (by fafner)
by tehjoe
Trouble saving a struct to a binary file
 
Hello all I've been at this for a good long 4 hours now and see nothing wrong with my code...I am still a bit of a newbie so any help would be appreciated. ...
[1 reply] : So what happens when you run the program? Does it crash or something? ... (by blackcoder41)
Bool question
 
how would I write a bool statement if I want to display a message if somebody divided their income by 10% or if they did not divide their income by 10%. For ...
[8 replies] Last: Haha I've been staring at the screen too long I didn't even realize th... (by barkley)
May 2010 Pages: 1... 2021222324... 33
  Archived months: [apr2010] [jun2010]

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