General C++ Programming - February 2012 (Page 22)

Arrays are pointers; pointers are arrays?
 
"Arrays are pointers; pointers are arrays." What does this means on a conceptual level? I've heard my professor talk about arrays in this way but I don't un...
[13 replies] Last: > A void pointer is an object pointer and can point to any type of ob... (by JLBorges)
by mweshk
Voting program
 
Hi good friends. I am designing a program that accepts users choice from the listed candidates. The candidates are tallied and listed according to the votes cas...
[2 replies] Last: Oh yeah just noticed the cin problem, read this. http://www.cplusplus... (by Muckle ewe)
by Zapeth
How to copy a certain range of an array?
 
Hi, I am probably blind or lacking some basic knowledge here but I cant seem to find a nice solution for copying a defined range from one (char*) array to anoth...
[6 replies] Last: I would use std::copy: http://cplusplus.com/reference/algorithm/copy/ ... (by moorecm)
printf statement nopt working
 
Hi, I tried to debug my code using printf statement... But previously it was working and today when i tried the same it was not working.... I tied the p...
[2 replies] Last: Sorry guys.....one dll was missing in my build folder but i dont know ... (by sharath137)
Problem with file updating using seekp()
 
I have been creating this program for a student registration system. For the file handling So far I can write in to a file , view all records, and search a sing...
[no replies]
by Tier
Need help w/ Pointer / Arrays -> Accessing characters of strings
 
Hi, I am having trouble trying to figure out a way to use an array of pointers (which points to different strings) to be able to access each letter of the st...
[2 replies] Last: I see what you mean. My intention at first was to have an array of po... (by Tier)
question on browser to server connection
 
Hello people. I am trying to develope a html link that when i click on ym web site will contact my c+ server. In this link i wish to tack on the end a variable ...
[1 reply] : I don't understand what you are asking? Are you trying to create a web... (by closed account o1vk4iN6)
by NGen
Unknown Syntax?
 
While looking at some of the code for RakNet, I've seen code like this: virtual void PreDestruction(RakNet::Connection_RM3 *sourceConnection){(void) sourceCon...
[2 replies] Last: Really? I've never seen that before, I didn't know you could use it li... (by NGen)
by rucafe
exception handle
 
As I write my main program I keep getting exception handles: Unhandled exception at 0x75abb9bc in program.exe: Microsoft C++ exception: std::out_of_range at ...
[1 reply] : Didn't you get an answer here? http://www.cplusplus.com/forum/general/... (by kbw)
Using template argument in a macro
 
Hi.I'm trying to generate constant strings with template arguments, and I have no idea how to do that. Here's a simple example: #define tostring(x) #x t...
[8 replies] Last: Haha, that's pretty awesome. Unfortunately I decided to go with anothe... (by GooseMunch)
Rpg printing to console
 
Hey guys =D I was bored the other day so I decided to make a class for c++. The class allows you to write console messages in an RPG style. So here is the clas...
[8 replies] Last: Thank you ne555. I will read through this =) (by SuperSonic)
by Milun
Problem with Dynamic Allocation of Class array
 
Hello. I have been at this for a week and it still confuses me. Basically, I have a class, class_bot, coded in a .h file. It also has some inheritance of anoth...
[7 replies] Last: Oops, sorry. I missed the email notification of this one. Thanks for a... (by Milun)
strange "R6010-abort() has been called" error
 
I've got a console program which essentially automates a large number of commandline apps, and to implement ghetto threading (because getting into real threadin...
[7 replies] Last: Great glad I could help. I whipped this up for you as well... Here y... (by clanmjc)
by aas09f
can't figure out this long list of errors
 
Hello, this is my first post. I've been stuck on an assignment for quite some time now, I have to create a mixed numbers class along with a few functions and 10...
[5 replies] Last: Thanks. I actually had Mixed::Mixed (int d) { i... (by aas09f)
threading issues
 
as a reply on my previous thread indicated that learning threading should be easier than what I was doing, I'm looking into it. After spending 6 hours on it, I...
[5 replies] Last: finally got it sorted, thanks to clanmjc's help. solution at bottom o... (by Eric Jones)
User Input Validation
 
Hello all, I am writing a basic program for class that requires me to validate the input for the user. In the code segment below I need to be sure that he us...
[1 reply] : you can use 'cin.get()' to retrieve the first character in the stream ... (by Vins3Xtreme)
Arguments and Functions
 
Alright, I'm supposed to be writing a program that does this: Write a program that demonstrates your understanding of functions, conditions and loops. The pr...
[5 replies] Last: Thanks very much...I figured it out now! (by KaraPardue)
bool being initialized to true?
 
It was my understanding that I could create a bool variable and then pass it as a reference parameter like so: List myList; bool x; myList.sortedInsert(...
[1 reply] : All basic types (including bools) are not initialized to anything unle... (by Disch)
Beginner trying to do a IF ELSE statement
 
I have been working on this for some time now. I need to little help from someone that knows what they are doing. Here is my answer to the problem: #include...
[2 replies] Last: It gave me 3 digits after the decimal point. Should I use cout <<... (by Diana Magers)
SDL surface to surface copy
 
This is the follow on from an earlier post, this is the core problem. This works... AsciiBMP = load_image( "AsciiLine.bmp" ); AnotherSurface = SDL_SetVideo...
[5 replies] Last: thanks I didn't know that, I will give it a go. AnotherSurface=... (by alastairl)
February 2012 Pages: 1... 2021222324... 43
  Archived months: [jan2012] [mar2012]

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