General C++ Programming - November 2011 (Page 35)

by KDE
Help me out with one simple issue please
 
I got Accelerated C++ (is this book outdated, because I swear std::cout and that kind of stuff is horribly outdated?) and I have a huge issue with making the co...
[4 replies] Last: I've not heard that cin.get() replaces a std::endl; , so I'll tell you... (by Ben Duncan)
getline/gets problem
 
I'm making this structure database program thingy here is the code #include <conio.h> #include <iostream> #include <string> using namespace std; struct stude...
[4 replies] Last: WOW!!! thank you very much, that solved my last problem, thank you tf... (by MaZtRHaXoR)
namespaces in different file, preprocessor directives and static variables
 
Hello, I'm new in this forum. I was trying to understand the following behaviour under Visual Studio C++ 2008 express edition. I have defined my own class (my...
[3 replies] Last: with more googling I finally figured out why richardforc solution is r... (by samusamu)
Virtual Key Descriptions?
 
I know all the virtual keys are in the Windows API like this.. VK_MBUTTON = "Middle Mouse Button" VK_KEY_G = "G" But is there anything in the Windows A...
[12 replies] Last: Funny thing, I was looking for the exact same thing, I'll probably use... (by smash85)
How do I parse an XML file?
 
Good morning, I've been trying with various libraries (everything from pugixml to RapidXML) but have been unable to parse a simple XML file. My RapidXML a...
[no replies]
by krow
Recommendation on a good C++ book
 
Hello, I'm a bit indecisive as to which C++ to pick, my doubt is between two books: 1. Sams Teach Yourself C++ in One Hour a Day 6th Edition 2008 2. E_Ba...
[8 replies] Last: Thanks again, I'll take a look at those books you guys recommended. (by krow)
Library management project
 
please give me library management project
[1 reply] : Here you get the source code for library management project http://cod... (by Dinesh subedi)
Sending a pointer to a function
 
Hello, I am correctly working a project that sends an array to a function but the fuction receives it as a pointer. Below is an example of code similar to what...
[2 replies] Last: Codekiddy, Thanks. I forgot to add a function call to the code above.... (by TnGraham)
C++ and mysql connectivity
 
guys i want to make a simple program connected with mysql. i had searched many topics related to it, but still having problems. im beginner in c++ so send me st...
[4 replies] Last: nice (by rohitsah1)
Colored text in Windows Console
 
I'm trying to develop a roguelike game for the console, and I decided that black and white simply won't fit the bill as well as I though it would. I know that t...
[3 replies] Last: IF you don't want to use system() function then you can use code for ... (by Dinesh subedi)
Unavoidable goto?
 
After few minutes of thinking, I failed to find a way to prevent a goto in this piece of code. Is it possible? Maybe whole thing should be re-written? MainM...
[3 replies] Last: @Moschops Wow... That looks pretty good. With small modification fits ... (by closed account 10oTURfi)
How to explicit undeclare variable in C++
 
We all knew every programming language has its own approaches to introduce new identifies into current context. In C++, we called them declarations. On the ...
[7 replies] Last: Another option may be to assert. If you insist, you could wrap the as... (by moorecm)
fixed-point types not supported in C++
 
double sqrtpi,rootpi; int k =0; for(int k=1;k<=1000;k++) { int a = 2k +1; sqrtpi = 1/pow((2k +1),2); } This is my c++ program and it gives this error....
[1 reply] : what does this mean? int a = 2k +1; also your local var is hidding g... (by codekiddy)
My do while loop isn't looping!
 
#include <ctime> #include <iostream> #include <cstdlib> using namespace std; int main() { int num = 0; int num2 = 0; int num3 = 0; int num4 = ...
[5 replies] Last: [quote=heymrjack10] i gave the user2 a value of 0 before the loop If ... (by Galik)
Base class pointer vector confusion
 
I've gotten myself conceptually stuck in trying to convert a working C++ program from a C-style approach to one using inheritance and polymorphism. In particula...
[no replies]
by gizzmo
memory leaks
 
Hi, How can I find (detect) memory leaks in my program? I work on Mac and Linux. Are there any tools that I can use?
[10 replies] Last: leaks only runs on live programs. So to stop your program terminating,... (by kev82)
by alend
Problem with The Boost C++ Libraries book
 
I am going to run the programs from The Boost C++ Libraries book, but the following exception always occur: terminate called after throwing an instance of...
[no replies]
Access txt file in resource
 
Hello, I've added TXT file to my resource, but now I need to know how to access data in it? can I use fstream to read data? and if yes, how? can u give me...
[13 replies] Last: Once you've loaded you file data from the resource and found/created t... (by andywestken)
using fstream to read txt, passing data to object
 
I am trying to read a multi line txt file that has a different type of data on each line, starting over every 4, as in name on one line, pay rate on the next, a...
[no replies]
Not getting proper output with my for loop
 
Trying to write a function that takes a letter from user input and checks it against an already existing array. I tried tweaking it and playing around with diff...
[no replies]
November 2011 Pages: 1... 3334353637... 47
  Archived months: [oct2011] [dec2011]

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