Beginners - February 2012 (Page 47)

List sorter not working all of the time
 
#include <iostream> using namespace std; struct Nod{ float a; Nod *adr; }; Nod *v, *p, *sf; void add_first(Nod *&v, float val) { p=new Nod;...
[3 replies] Last: The only function that you need is sort() (weird name, btw) Or if yo... (by ne555)
Help with program possibly involving some loops!
 
So i need to create a win32 console program that basically asks a user to input certain information about random people...ie: height, shoe size, weight. after t...
[13 replies] Last: thank you so much! that makes sense (by programmer2112)
random walk problem
 
Hi all, I am going through all the assignments in my stupid book from D. Yewick which I will throw away I think. Just (I know "just"...) wanted to do the ran...
[3 replies] Last: It's kind of useless without indentation ;) Change line 42 by const i... (by ne555)
Right justified triangle help please
 
I can get my triangle to be left justified, but i have tried almost every combination of using spaces to move my triangle over to be right justified and i am ab...
[2 replies] Last: Here's one using while... extrapolate for for() #include <iostream>... (by Texan40)
How can I get the default constructor to "set" the values for a date?
 
Hey folks. I could use a pointer here. Been sitting here for a while trying to figure out which approach to take next. We've been given a project in which w...
[7 replies] Last: Simple mistake. Figured it out. Again, thanks for your help! (by dilutedsun)
Pass an array of objects into a function
 
This has been bugging me for some time now.. #include <iostream> using namespace std; enum ActorType { PC, NPC }; class Player {...
[9 replies] Last: The point I was making is that 2D arrays tend to be overrated. No, you... (by closed account S6k9GNh0)
conversion from int to double
 
my program is throwing an exception after i enter the last pieces of information to fill the array. here's the error i'm getting: EDIT: in the console window it...
[4 replies] Last: i'm using visual studio, Whilst I haven't used it for many years, I... (by Moschops)
What is a game engine?
 
So, I am wondering what is a game engine ? In this link http://www.gamefromscratch.com/page/Game-From-Scratch-CPP-Edition.aspx , this guy makes a simple pong ga...
[3 replies] Last: The engine is 9/10 a base for a game. You always need to add your own ... (by WhiteWind)
Using = and ==
 
Something I thought was very interesting while reading about the basics of booleans was the different uses of = and ==. I wrote this program to provide some ...
[8 replies] Last: Awesome. Thank you for the replies, every bit helps. I tried typin... (by pieman12)
Advanced WinAPI tutorials?
 
Can someone recommend me some advanced Win32API tutorials? I would like to improve my chat so I need some advanced settings, controls and visuals there, like on...
[1 reply] : bump? (by mekkatorqu)
Two dimension arrays
 
Hi guys, I am trying to figure out how to set up two dimension arrays. I might not be using the right terms but i have 7 columns and a few hundred rows. What I ...
[6 replies] Last: the code works great. I tried adding another if argument and when it r... (by yoitsmejy)
Recursive C++... Please Help
 
I am very new to this and I'm really having a hard time trying to code and stuff. We have an exercise tomorrow about recursive function and I've been practicing...
[2 replies] Last: it works thank you very much. i see there was really a problem with my... (by HansKoKo)
Trying to move a function and having and problem
 
I am trying to move a function named printReport to main and I am having trouble with the parameters... THe parameter "count" when passed is not printing out th...
[11 replies] Last: Thank you, thank you, thank you. Sometimes the obvious just is not so... (by chriscoleo)
Strange compiling error.
 
I wrote this code: #include <iostream> #include <vector> #include <cmath> #include <climits> #include <algorithm> #include <iomanip> #include <utility...
[7 replies] Last: Very interesting read, thanks for that. (by clanmjc)
Inheritence / function help
 
class house { char type; } class flat:house { int rooms } class detact:house { int rooms; } class old:house { int rooms; } How would i go ab...
[1 reply] : Your array would contain elements who type are pointers to houses. Yo... (by clanmjc)
by lql44
Dll File
 
Hi ALl, I am trying to test a .Dll file I wrote, but have the following error: TestDllB.obj : error LNK2019: unresolved external symbol "public: static ...
[1 reply] : In order to use the function you need to change dllexport to dllimport... (by webJose)
by pzling
Arrays as Argument
 
Hi I'm trying to implement a constructor that will take an array as a parameter. The class to which the constructor applies has (non-class) functions, which ...
[10 replies] Last: thanks, I think that helps, if at least for my general understanding. ... (by pzling)
by lare26
RPG File i/o question (1,2)
 
I have a file that I plan on using for a script I want to create for a console text RPG I have been using to learn C++. I want to create a class to read data fr...
[35 replies] Last: string Item::setprefix() { std::ifstream iFile("WeaponPrefix.txt"... (by Lynx876)
Need help with Object Oriented Programming...
 
This stuffs amazing! You can build all these crazy systems way easier than with functions! Okay, I'll stop gushing. I took a couple of classes, but we haven'...
[1 reply] : It's good practice to have your class declarations in a header file an... (by MrHutch)
New to programming and need help with assignment.
 
Hey everyone, this is my first time posting in this forum and i was hoping you guys could help me to write this program for my class. This is the assignment:...
[10 replies] Last: cout << "1: " << tok1 << endl; cout << "2: " << tok2 << endl; cout <<... (by Zinglish)
February 2012 Pages: 1... 4546474849... 64
  Archived months: [jan2012] [mar2012]

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