Beginners - February 2012 (Page 9)

Trouble with Boolean ( Linear and binary search )
 
I am working on a program that finds a value within a list through either binary or linear search. I based it from the algorithm in a book. The algorithm work...
[2 replies] Last: 1 2 3 4 5 while ( loc < n && found == false ) { if ( item == list[... (by galiwocky)
undeclared(first use this function)
 
I am new to c++ and I am a stupid nub... I can't figure out why my... deta=(aei+bfg+cdh)-(gec+hfa+idb); is undeclared What lib do I use? and I am suppos...
[2 replies] Last: wow Thank You very much! you're a lifesaver! (by closed account zT7X92yv)
Remove punctuation marks from file
 
Need to read in a file in C++, and remove all the punctuation and repeat words. What would be the best way to implement this? File is in the style: word wor...
[1 reply] : In pseudo-code: open file // Use std::ifstream("/path/to/file") if (... (by chrisname)
error C2079: 'A::b' uses undefined class 'B'
 
I really want to know what the compiler is doing here. I have 3 files: ==================== A.h =================== #ifndef A_H #define A_H #include "B.h" cl...
[1 reply] : http://www.cplusplus.com/forum/general/62930/#msg340590 (by kbw)
app crash on file read
 
I'm getting an app crash error when I try and read in from the file. int i, stateId, countyId = 0; string state, countyName; char comma ; cout << "file ...
[4 replies] Last: ok. I think I found the problem with the read. state is declared as a ... (by savan12986)
Loop help?
 
Hello everyone. I'm am really new to C++ programming. I started about 2 days ago. The best way for me to learn is to learn as I go, but I have a problem. And I ...
[1 reply] : use booelans: bool nextStep = false; while(!nextStep) { cin>>user... (by timmyyyyy)
by eves
++ operator?
 
Hi, I'm writing a class called bignum, type vector of char. I'm trying to write the ++ operator but it's not working... The ++ is a prefix (as in (“++i,” w...
[11 replies] Last: changed the constructor to // converts integer into a vector of type... (by eves)
Game of Life Help
 
Here is my current code: //Game of Life //Dylan Metz #include <iostream> #include <string> #include <fstream> #include <cstring> using namespace std; ...
[3 replies] Last: I need help finishing this code. What do I do? I need help with the la... (by shywolf91)
AVL Tree crash bug
 
Hey, I am trying to get an AVL Tree working but I seem to be having a problem after running the remove operation several thousand times on a very large tree, ca...
[1 reply] : Can anyone help me? height is an int representing the length of the su... (by Bill Horstkamp)
library inventory
 
Message flagged Tuesday, February 21, 2012 4:03 AM #include <iostream.h> #include <iomanip.h> #include <conio.h> class library { char author ,title ...
[3 replies] Last: Was there your code or code someone else wrote? (by ResidentBiscuit)
enum to string
 
enum day {monday, tuesday}; Anyone can tell how to transfer monday, tuesday to string "monday", "tuesday" Thanks
[1 reply] : Lookup table: const char* daynames = {"monday","tuesday",...}; enu... (by Disch)
by Owain
Silly question
 
Hello, Im new to C++ and I am having some issues with arrays of chars (strings I belive). My issue is that I dont know how to get how many elements of the array...
[2 replies] Last: if you put a NULL char after your pathname, you can just do a 'for' lo... (by timmyyyyy)
Sorting-Struct
 
I'm currently working with a struct, node. struct Node { int studentid; string studentinitials; double testscore; Node *next; }; I'm currently...
[2 replies] Last: I've looked into that, but i'd like to keep them in Nodes instead of u... (by rocketman)
Opengl Bullets not showing.
 
I have done various tests so I know the bullets are there but its just not drawing. This is the function that actually draws it: void Bullet::Draw_Bullet (...
[2 replies] Last: The other object GLuint texture; texture = LoadTextureRAW( filena... (by closed account 2NywAqkS)
by nballi
comparing string arrays
 
basically I'm trying to sort an array of strings using a bubble sort but when I run the program I get a message saying "main.exe has stopped working". I've trie...
[6 replies] Last: Okay, I got it to work, sorry I kept looking past those numbers I comp... (by nballi)
data type problem
 
I have a data type problem DWORD procNameToPID(const char *procName) { HANDLE snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); if (snapshot ==...
[no replies]
Using getline()
 
Hello everyone, I am having this problem with getline(), where whenever my program reaches a getline() statement, i.e.: getline ( cin, string); instead of wa...
[11 replies] Last: Even worse, I thought I read through all the istream functions. Someho... (by NewProgrammer)
find in <algorithm>
 
Hello. I am quite confused with the "find" function in <algorithm>. #include <iostream> #include <list> #include <algorithm> #include <string> using n...
[3 replies] Last: Thanks coder777 and hamsterman! Combining your suggestions, I can now ... (by AoZplusplus)
Why are these considered abstract classes??
 
My complier is telling that these two derived classes are abstract, and for the life of me I can't see why. #include "ThreeDimensionalShape.h" class Cu...
[5 replies] Last: Found it I had getSurfaceArea in my concrete 3d classes so there for g... (by jokerfwb)
Strange Errors that Can not understand because of String Variable
 
Hello, everyone: This is a modified version of my 3 files program, but seem it stil not working... the erros messages are: Error 1 error LNK2005: "class st...
[2 replies] Last: Hi, Stwbond: I moved extern string dayName ; out of class and made i... (by adamhere)
February 2012 Pages: 1... 7891011... 64
  Archived months: [jan2012] [mar2012]

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