General C++ Programming - October 2012 (Page 39)

by pyfgcr
Cannot use macro defined in header.
 
header.h #define x 1000 header.cpp #include "header.h" void foo() { printf("%d",x); //Error } When I define x in header.cpp, I can use it ...
[1 reply] : you shouldn't be using macros. If you want to create a value that is ... (by pogrady)
Decryption assignment help!
 
So, I have an assignment for school in which the user enters a filename and three integers from 0 to 26, using these integers one by one the program is supposed...
[1 reply] : Ok I solved the whitespace problem, but now after a space, the decrypt... (by David Goldman)
storing filenames in an array
 
Hello, I want to create filenames such as Query.student.1.bin and save them in an array. I have no problem when I don't include a "." between student and numb...
[2 replies] Last: Worked! Thanks (by palireza)
by vw4x4
please explain
 
int num ; int *ptr; here we use num to refer individual cells or data stored in it? is ptr and num any kind of operations,coz both of them is giving the d...
[4 replies] Last: If it is just laziness, try reading these tutorial chapters. They wil... (by doug4)
Basic Help With Dev-C++
 
Hi guys, i'm new in this forum, i'm having a silly problem with save route in this environment. I want to auto save my new files in a specific route, but.... i ...
[3 replies] Last: Off-topic: Please don't use Dev-C++ from before version 5. It's appall... (by Moschops)
Hash encryption and salting in c++
 
Hi all, can i ask how can i get started with encryption and salting using c++ i got the basic program written out, which is the written the username and passwo...
[4 replies] Last: oh okay! sure thing, thanks alot! (by CLearner88)
Can someone help me debug my program?
 
#include <iostream> #include <stdio.h> #include <cstring> #include <vector> #include <iterator> #include "MQmessage.h" #include "xmlrB2BMQClass.h" usin...
[4 replies] Last: I assume user_property .value=(const char*)GetMQStateCode(); is th... (by coder777)
by Yezman
Stack Frames. Factorial recursive vs iterative
 
Text - My question below ------------------------------------------------------- Let's consider the resource costs of the recursive version of factorial: ...
[2 replies] Last: Put it within a source code format, to make it clear, don't expect any... (by Eyad)
Stack Template Implementation - Need Suggestions
 
Hi All, I am reviving my C++ knowledge; so to start off with, I have implemented a Stack template. The code for Stack template as well as a sample class to ...
[5 replies] Last: Thanks! I would also like to have some suggestions for the next step ... (by amitapm)
Homework help c++ Structs
 
This is my code for homework. I am doing a lot of stuff wrong but don't know exactly what. Any suggestions? #include <iostream> using namespace std; c...
[11 replies] Last: addingNewArrival = addNewArrival(totalArrivals); What did you tell ... (by Moschops)
by aj3423
error calling non-static function
 
Hi, I'm reading the source of a gui library called egui, I found the Property mechanism is interesting, but the source doesn't seem to work: Property.hpp: ht...
[2 replies] Last: Oh that's it, the derivation is so complex. Thank you guestgulkan. (by aj3423)
Timer (class and function)
 
i'm a beginner to programming and got an assignment to create a stopwatch/timer, that counts in seconds/minutes/days etc Does anybody know a way to create a ti...
[5 replies] Last: can anyone help me with this as its got to be in friday and i currentl... (by district)
Strange problem with static member functions and namespaces
 
I have got a strange problem with static member functions. Given the following code example: TransmissionType.h: #ifndef TRANSMISSIONTYPE_H_ #defi...
[3 replies] Last: Yes, exactly. Thank you very much for your efforts, guestgulkan. You m... (by Weddingcrasher)
Better way of reading a file.
 
Code1 std::string readContentsOfFile(std::string fileName) { std::ifstream file(fileName.c_str()); if (file.good()) { std::stringstream buffe...
[3 replies] Last: I think I should use the first version as mostly I am interested in re... (by Raman009)
help with determining FPS
 
This is part of the 3d Buzz " Intro into Game dev" series. I cant find any help on their site. Im trying to show the FPS on the console but every time, I try...
[1 reply] : When working with integers, try to avoid such things as a/(b/c). Integ... (by helios)
How to add a running total?
 
I just need a running total to sum up the number of seats taken at their cost. Can anyone provide tips of some sort? I'd appreciate it. I've included my followi...
[5 replies] Last: @rollie 1. I was meaning that newbies shouldn't make a habit of usin... (by TheIdeasMan)
Fractions
 
n
[2 replies] Last: N is undefined here. (by pogrady)
Sorting 4 sections of array
 
i am stuck trying to sort a deck of cards ( 52 ) where 4 hands are delt and each hand is sorted seperately and each hands cards has 13 cards. sorry this is ...
[1 reply] : Google qsort. (by pogrady)
Merge sort
 
This is the code I've done for the merge function of my merge sort algorithm. When called the function successfully merges the two arrays passed in however it d...
[3 replies] Last: Yeah, the problem is that it is supposed to sort it as well, not just ... (by budgebi)
Virtual Print function and base class pointer array
 
I'm currently trying to get a series of classes to output certain information using a virtual print function that reads out an array of base class pointers. I'm...
[8 replies] Last: That did it! Program runs perfectly now. Big thanks to you guys, Peter... (by AdamBomb89)
October 2012 Pages: 1... 3738394041... 50
  Archived months: [sep2012] [nov2012]

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