Beginners - May 2012 (Page 4)

by R00
Constructing a Tree
 
Hello I'm trying to learn how to build a tree (binary or non-binary). I found so many codes but I could not find clear explanation on the internet. If some...
[3 replies] Last: What don't you understand about the first link? (by Gaminic)
by x1222
Function comments convention?
 
Hello, Can anyone tell me what's the convention for adding comments describing the pre and post condition of a function? In my textbook it does the commen...
[1 reply] : Convention, regarding comments? Get real. Anyway, if you use a docume... (by Catfish2)
Read and Search a CSV file
 
hi. i know my question is a basic one, but i am a noob when it comes to c++. now, how do i search a csv file?. e.g. i will enter an employee id and it will retu...
[2 replies] Last: > i will enter an employee id and it will return the name and address... (by JLBorges)
Which data-type
 
I need to ask: Which of the data types is "large" enough to hold value worth 600billion(600,851,475,143)? Under 32-bit machine running XP SP2,Dev-Cpp
[9 replies] Last: > Code::Block with what mingw? The Nuwen build of MinGW is a good opt... (by JLBorges)
Help with a program have tired for hours cant figure this out
 
so here the basics of the file #include <cstdlib> #include <iostream> using namespace std; int main(int argc, char *argv ) { srand (time(0)); int d...
[2 replies] Last: pls paste ur code using code tags, about ur problem you are accepting ... (by SirSmilesaLot)
Ideas for fitting arrays into my project?
 
For my class project I am planning on working with a math generator rpg game that includes a health and leveling system. On top of that there is an option to pi...
[1 reply] : A few random ideas: - You could allow an arbitrary number of players ... (by Zhuge)
by ortymd
LNK2019 fatal error LNK 1120
 
Good day, everyone. I'm writing a String class. It's major purpose is to create and modify strings of characters. Everything went well until I overloaded the ...
[8 replies] Last: vlad from moscow (932) May 29, 2012 at 7:37pm You should show the... (by ortymd)
Unwanted variable change in array
 
#include <iostream> #include <cmath> using namespace std; int main() { int a = 0; int b = 0; int c = 0; int d = 0; double e = 0; double j = 0; ...
[4 replies] Last: Wow I'm such an idiot why didn't I notice that! I'm such a noob...lol.... (by Dogrune3)
My coding doesn't work
 
I couldn't find why my code isn't working. When i run it pops up tell me enter the number after that is print out not correct number. Please tell me what wrong...
[1 reply] : It looks like you haven't initialized Temp.Score . Try the following... (by shacktar)
Best navigation method for RPG?
 
http://i.imgur.com/s9qh0.png ^I'm creating an RPG Text Adventure using C++, I planned on creating a void function for each individual room, what would be the...
[5 replies] Last: @^ If you're saying you've never learned about arrays, then this is go... (by GRex2595)
I have a couple of general questions for my program
 
#include <iostream> using namespace std; int main () { cout << "In this program, you are going to be asked to pick a number between 1 and 10, but your not g...
[1 reply] : 1. You can use cin.ignore to wait for the next line cin.ignore(numeri... (by Peter87)
UNABLE TO CALL DECONSTRUCTOR
 
Hi guys, I need help. The only problem with this code is it won't call my destructor. Destructor is suppose to run automatically even though you don't call it. ...
[2 replies] Last: Ohh I found it Athar! Well the "system ("pause");" was messing it up f... (by RICEFREAK)
Back to functions
 
Hi, another newbie here. I thought I had a basic grasp on functions and was attempting to move on to arrays when I ran across an issue I can't figure out. Her...
[3 replies] Last: Okay. Thanks for the feedback and advice, it's all very helpful. Hopef... (by Phoolishness)
Invalid operands?
 
if(*(arrPtr + j) > *(arrPtr + (j+1))) { temp = *(arrPtr + j); *(arrPtr + j) = *(arrPtr + (j+1)) *(a...
[3 replies] Last: Yea I know about swap, I was just wanting to be fancy here. And didn't... (by ResidentBiscuit)
Catching bad allocation
 
I'm creating an array dynamically, and I'm trying to catch it failing, though it doesnt seem to. Even though I give it absurd sizes. Am I doing something wrong?...
[2 replies] Last: Ah that does work. I was just using random numbers before, which would... (by ResidentBiscuit)
how do i get the time in seconds starting from 2000 to now
 
i need to get the time in seconds from jan 1 2000 up to today ,i cant seem to get it thanks #include <iostream> /* time example */ #include <stdio.h...
[13 replies] Last: There are 7 leap years between 1970 and 2000, not 7.5. (by Athar)
by maroun
Templates+inheritance
 
Hey all, When I compile my program I get 19 same errors that say : error C4519: default template arguments are only allowed on a class template. for every...
[7 replies] Last: [quote=maroun] "But then I need to send in main the exact template and... (by closed account zb0S216C)
My Game
 
Hi I just made my first game without help however I'm not sure I did it very efficiently. If you want to you can compile it and please give me some feedback on ...
[2 replies] Last: Thanks! All silly mistakes... :P (by closed account iNU7ko23)
switch triggered on key press
 
Hey guys, I was working on a program to simulate a finite representation of infinity and had this thought. Is it possible to have a switch statement trigge...
[1 reply] : It's a real PITA to do this with the IOStream library but if you're us... (by Computergeek01)
Dynamic allocation and records
 
It's been many years since I played with C and I am trying to get back into it again. I am working through a book "Programming abstractions in C++" by Eric S. R...
[4 replies] Last: O.K., Fiddled a bit and found the solution: #include <iostream> #i... (by rvangend)
May 2012 Pages: 123456... 59
  Archived months: [apr2012] [jun2012]

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