Beginners - April 2011

by smithf
Toubleshooting Array
 
Hey all, I'm solving this problem for a college programming class. I'm having trouble getting the array to output correctly. #include<iostream> #include<cma...
[4 replies] Last: Here ya go: #include "hw13.h" int main() { Fin one; cin >> one; ... (by smithf)
Help using classes
 
I have a class that uses another class type and I can't figure out how to access it. This is just a simplified example but I think it's enough to explain my ...
[6 replies] Last: Thanks guys, just what I needed. I got the program working. (by universal exports)
by firix
back_inserter() for basic_string
 
Hi, How I Write a version of back_inserter() that works for basic_string
[no replies]
by gavGaz
Vector elements not what they say they are?
 
I have created a vector storing floats. I want to 'shuffle' the array so that elements are swapped. I do this using the function below. void shuffleArray(...
[2 replies] Last: In order to do this: #include<iostream> #include<vector> using names... (by Mohamed Fouad)
by ascii
where to go from here
 
im solving a programming challenge where you have to devise a program to print out every possible combination of the letters in a string. the mini algorithm i ...
[8 replies] Last: didnt know you had ablog lol, but im near giving up on this and just w... (by ascii)
Text File
 
How do I do something like this... myfile.open ((filename)(".txt")); or ifstream myfile ((filename)(".txt")); those aren't the actual codes, obviously, ...
[18 replies] Last: Thanks for all the help! (by Shay9999)
Creating a function using a string?
 
So, if you can see what I'm trying to do here, please help me out. I want to make a function so that I don't have to type out the options every time. this is ...
[9 replies] Last: programmer47 (43) Why use #define here is a simpler way to get the jo... (by Mohamed Fouad)
Static Variable?
 
I have read a lot and already have a crude idea about what a static variable is. But I want someone here experienced to explain in layman language what a sta...
[1 reply] : a static variable means that it is only instantiated once. so if i ma... (by ascii)
Any good SDL tutorials?
 
Well I've been studying C++ about a month and a half now and I have a pretty solid understanding of many different things (classes, pointers, references, arrays...
[9 replies] Last: Thanks! I'll check it out. (by TheNoobie)
if esle statements, program outputs the wrong counts C++
 
Hi, this is maybe my fourth program ever for progamming ever, and something is wrong with the semicolons I think within the if esle statements but when I remove...
[2 replies] Last: Your program is missing a #include<stdio.h> at the beginning and #i... (by Mohamed Fouad)
function implementation and prototypes?
 
We have a test on tuesday, and I was hoping to get some step by step help on implementing functions and identifying their prototypes. I went to the tutorial, bu...
[6 replies] Last: i quote myself: you ALMOST NEVER perhaps this is still a bit of an e... (by ascii)
Using Inheritance one classes
 
Using Inheritance one classes question. Class hello { public: int hi; }welcome ; what would the inheritance be for this class?does the inheritence cop...
[4 replies] Last: This is java? didn't know, i am using a different one from c++ but its... (by zone19871)
Some help with inverse sine (asin)
 
I am new to both the forum and know very little about c++. I am trying to write a program that will be menu driven and calculate the missing angles and side len...
[2 replies] Last: Thanks, a lot. I can't tell you how many times I overlooked that. It w... (by thefirekiller)
Having some major troubles with my script
 
I am taking a C++ programming class in college and need to make a 10X10 grid of numbers that go from 0-9 and after the number reaches 9 it resets back at 0. Lik...
[14 replies] Last: haha sorry didnt read that post. mine still takes up less lines, espe... (by ascii)
Stuck with user-defined functions !!
 
Good Day everyone This is my first topic here . I am a newbie who is trying so hard not to hate CS and actually pass the course with a functioning brain !!! ...
[4 replies] Last: First you can also do the first problem with out making change in y... (by mahinkhan22)
Trouble converting a class to a class TEMPLATE in c++
 
Hi guys, I am having problems converting a class to a template as the title explains... I would really appreciate if someone can look up to this code and te...
[5 replies] Last: NVM it is working now. There was a mistake on the file linking process... (by gonigkum)
by Phazon
srand without using time
 
I'm making a game with 'comets' falling from the top of the screen that you have to dodge and I'm using srand(time(NULL)); to decide the starting x location of ...
[5 replies] Last: Thanks guys, I got it to work properly now. (by Phazon)
Switches
 
How can a switch have two options like if (here=1&&he=2? and if possible a int with a bool
[3 replies] Last: They're essentially a tidy stack of if else blocks, with the added ut... (by hamsterman)
by zackj
Deleting a Node from a Binary Search Tree
 
Hey guys, hopefully you have have some insight on my problem. I have written a Binary Search Tree code that involves many methods (Count of the number of nodes,...
[1 reply] : IIRC if the node has both sons, you need to replace it with Largest( ... (by ne555)
adding elements into vector
 
having a problem adding elements into a vector. it stalls the bracket and i think it is because of an out of bounds error, can anyone help? :/ occurs when i add...
[9 replies] Last: hmmm having issue with deleting an element :/ i have gotten rid of the... (by Makarintosh)
April 2011 Pages: 123... 55
  Archived months: [mar2011] [may2011]

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