General C++ Programming - October 2009 (Page 14)

by devas
A question about strcat
 
i have a sample code like this: char *pFilePath; if(...) { pFilePath = "../config/error.txt" } i want to inform user with a string like "INFO : Er...
[1 reply] : printf("INFO : Error file location is %s", pFilePath); or cou... (by Abramus)
big integer class
 
Hello, I am writing a class that can handle large number of digits. I am trying to overload >> operator so that it can store the user input value and if u...
[10 replies] Last: ostream &operator<<(ostream &output, const LargeDigit &num) { fo... (by Abramus)
loan payment calculation program
 
Thanks for all help in advance. My instructor wants us to create a program that relates to some event we have recently gone through and I need help to get the ...
[10 replies] Last: I had taken the up-to-date code that I had working and posted it in a ... (by ryujin89)
Financial Program assistance
 
My instructor wants us to create a program that relates to some event we have recently gone through and I need help to get the rest of the code to work. Scen...
[2 replies] Last: I had the core program created and was trying to get an extra functi... (by ryujin89)
program cant execute restart
 
#include <stdio.h> #include <conio.h> #include <iostream.h> #include <string.h> #define MAX 50 char name ; char exper ; int idno ; char jlvl ; f...
[7 replies] Last: #include <stdio.h> #include <conio.h> #include <iostream.h> #inc... (by icko718)
curiosity about c++
 
hmm.. whats the difference bet.<iostream.h> and <iostream>? whats the use of #include <vector> in the program?
[1 reply] : http://cplusplus.com/forum/beginner/12291/ http://cplusplus.com/ref... (by kevinchkin)
Understand this line?
 
For some reason, I can't understand these lines. They work and compile fine, but I don't know what they do. template <typename T, int N> char ( &Array( T(&...
[5 replies] Last: Aah, I get it now. Thank you! (by demosthenes2k8)
File Input
 
I've got a simple reader here to read out some data from a text file that stores a key/tag for an image and the directory where to load the image from. Now ...
[5 replies] Last: Does anyone know what function or something I can use to search for a ... (by Mythios)
all my booleans turn false, but why?
 
i'm working on a relatively simple game. I'm using an array of booleans which will mean an enemy is alive or dead. If benemies is true, the enemy is still alive...
[11 replies] Last: No problem :) (by Mythios)
Can someone tell how to read every second line of this code.. and for the search
 
Here is my code pal #include <iostream> #include <stdio.h> #include <fstream> #include <string> using namespace std; int main() { FILE *fp; char *p...
[7 replies] Last: Sorry i didn't specify... Just like if the user will search for the... (by nemesiscplusplus)
expected initializer before â<â token
 
WHY THE COMPILE GIVE SUCH ERROR error: expected initializer before â<â token this in in the implementation file .cpp inline void TwoDi<T>::Cpy(const Two...
[2 replies] Last: is not that, was error posting I have right in my code, can you tell ... (by olove05)
by nabeel
Unused functions
 
Hi, I have the following test program that I'm compiling with (g++ -O3 -Wall): #include <iostream> using namespace std; class mytest{ public: void p...
[1 reply] : In basic class all methods(and unused of course) is included to a bina... (by Denis)
Print 1234 as 12.34
 
in C++, what would i use to print "1234" (an integervalue) as "12.34" , reletively painlessly.
[2 replies] Last: tytytytyyty (by lampshade)
by jrohde
using ifstream >> operator vs. using fread
 
Hello everyone, I was in the process of replacing some C code with C++ counterparts. In particular I had a function which read from a .bmp file, the first t...
[1 reply] : The << and >> operators are for formatted I/O. You want the ifstre... (by Duthomhas)
by wtf
A little assistance with one of my encryption programs.
 
After a little bit of pain and suffering i've discovered that my encryption programs do not work with each other. They work swell independantly, and i've fixed...
[2 replies] Last: I tried looking at that list but I couldn't find one for a classic mon... (by wtf)
Scratching my head (extraction operator)
 
Hi guys, Im attempting to write(overload) an extraction operator for a class. It works fine and the fail bit is setting correctly when there is an error in ...
[3 replies] Last: Uh... Huh? std::stack<int> stack; for (int a=0;a<10;a++) sta... (by helios)
Complex
 
Hello. I need to print out the total (summation of all complex numbers) I retrieved from the complex.txt files and I'm having problems...Can someone help please...
[2 replies] Last: THANKS SO MUCH FOR THE HELP...IT WORKED PERFECTLY...GLAD TO HAVE MET Y... (by CATCH3624)
Recursive call going wrong somewhere
 
Hey all... I have been pounding my head for the last 3 hours trying to figure out where I am going wrong. Any help would be appreciated. #include <iostream>...
[3 replies] Last: Well you corrected one problem but created another. the following fun... (by guestgulkan)
by wtf
Anyone care to test my encryption program?
 
I hope this is alright to do here. But I've encrypted a plaintext file with my software and i thought i'd post it to see if anyone wants a try at hacking it....
[13 replies] Last: Well I'd love to provide the executable, but problem is, the executabl... (by wtf)
64-bit Ints Taking Toll on 32-bit Performance
 
I'm writing an application which makes extensive use of 64-bit integers for mathematical operations. I've consistently found through profiling that, on a 32-bit...
[4 replies] Last: Can you post the part of the code that is doing the divisons/mods? or ... (by turbozedd)
October 2009 Pages: 1... 121314151617
  Archived months: [sep2009] [nov2009]

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