General C++ Programming - April 2012 (Page 10)

Question on Structure Destructor Over Ride and Dynamic Allocated Memory
 
Say, I have a structure like this struct A { short foo ; short fooo; bool ifDynamic; A(int i) { if (i>1000) { ...
[5 replies] Last: foo needs to be a pointer to short if you are going to dynamically all... (by clanmjc)
Need Help! Please. Urgent.Urgent.Urgent.
 
Hello, everyone. Please help me create a HEADER file. Due by tomorrow. Thanks Thanks Thanks. Implement a class called MultiArray based on the UML below...
[3 replies] Last: using namespace std; Please do not ever put this in a header. It inv... (by Moschops)
second string and then adds the result to the result
 
for this program when it manipulations the second function i need help getting it to add the second function when it is manitipated to add to the first functio...
[no replies]
by TiiG
Jeep problem in c++
 
You are given numbers N and M. N represents the distance needed to cover ( in kilometers ), M represents the volume of the petrol tank of your jeep. To cover ...
[no replies]
collision detection is not functioning in this game code.
 
Hello, I am a beginner in game programming in sdl. I am following aaron cox's tutorial's at http://www.aaroncox.net/tutorials/ He has given an sdl...
[no replies]
Trouble including... (1,2)
 
I am starting to try and separate the small games I have learned to make into classes and separate files for constants and global variables etc... I can't se...
[38 replies] Last: ModShop is right about this. Each translation unit is compiled separa... (by Peter87)
by Barth
Problem with reading files.
 
Hello! This function in my program was supposed to read from a group of files of your choosing. The thought is that if you write "X", the function will read th...
[7 replies] Last: I actually think I see the problem now. It's looking for Antal, which ... (by Barth)
by kjoshi
Paddle Collision pong any advice please!!
 
Hi guys posted last time, making a simple pong game as a coursework and cant seem to get the ball to hit of the paddle I will post the code because I really am ...
[no replies]
i need help please
 
Hi everybody, so heres my problem. I've been doing C++ for a little while now, i've made some good useful calculators and thats nice and all but i want to ge...
[1 reply] : Believe it or not, it's actually harder to do this in the console than... (by Disch)
Calling upon a random number in IF statement
 
We have generated a random number (0 - 9999) and we have made it a constant variable. Now, our question is: How do we call it for an input? // computerpassw...
[3 replies] Last: For starters, I wouldn't name a variable the same as a function. It's ... (by closed account S6k9GNh0)
Help with classes
 
I am working on a program for my classes. I suck at coding and I don't understand it well. We are supposed to print out a calendar using classes and methods. I...
[1 reply] : My month header file #include<iostream> #include<string> using nam... (by Firepuma)
Creating a function that converts to postfix
 
I am currently trying to create a calculator that takes an infix equation and converts it to postfix, then calculates. I've got the calculator to convert when ...
[no replies]
How to read from a csv file please need help
 
I have no idea about csv files and it is showing. Alittle code snippet is while(x<3){ getline(customer, line); //get the customer info in a csv using getl...
[1 reply] : You may get some tips from this post where getline is used with a ',' ... (by vin)
Creating a dynamic array
 
I have a UML diagram with the following: - table: *list Where list can be any container from the STL (I chose queue). But the description of the assig...
[no replies]
Question on Arrays
 
So I need help on array problems and i have to ask the user for their name, phone number, 5 test scores, the average of their test scores and show in the outpu...
[7 replies] Last: Nevermind I solved the issue! I forgot to add the int = i; now my l... (by Chapin247)
Inheritance issues
 
I am trying to figure out why this can't work void package::users(){ info *uses=new info ; } void package::packagelookup() { uses ; } For wh...
[1 reply] : Yes, you're declaring uses inside the scope of users(), so it goes out... (by LB)
Reading/Writing C++ File Question
 
Hello, I am wanting to read a data file that is placed in my project file where the driver.cpp, function.cpp and function.h are located. I want to the use...
[3 replies] Last: What I am wanting is the program to open the file that placed in the p... (by MrMario)
Global Scope
 
Hi, can anyone explain when exactly a variable that has global scope goes out of scope? I imagine it is when the application exits, but is this a reliable way o...
[2 replies] Last: Cool cheers. (by slicedpan)
robert Sedgewick
 
anyone got this book algorithms in c++ part1-4 for author robert Sedgewick
[no replies]
Greetings All
 
Hi all, Noob here. Trying to understand pointers in conjunction with stringstreams. When I try to access the str() from my strinstream pointer it will no...
[4 replies] Last: >The last time I checked, C++ was still a high level language.. Point... (by arod20832)
April 2012 Pages: 1... 89101112... 49
  Archived months: [mar2012] [may2012]

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