Beginners - September 2012 (Page 22)

A Simple Symbol Table
 
I'm trying to solve a problem from a book I'm reading which states: "Write a template class Pair that can hold a pair of values of any type. Use this to imple...
[1 reply] : I assume you've seen Symbol table http://en.wikipedia.org/wiki/Symbo... (by andywestken)
problem in pushback array element in vector array (1,2)
 
I am trying to add some difference of array values in other vector array. like shown below . int sizeVector = 5; vector<int> aValues; aValues.resize(sizeVec...
[22 replies] Last: In the main function you used aValues and array. In the function you o... (by Peter87)
How to start this program?
 
This is a homework question I am a complete beginner when it comes to coding and i was wondering you could help me start my code for my assignment. i have to ...
[3 replies] Last: #include<iostream> using namespace std; int main () { //Hea... (by Fransje)
Console crashes after compiling fine
 
Hi. I'm trying to create a program to test my abilities (and it seems liek I need more practice :p) on what I've learned so far. I'm trying to calculate the cir...
[7 replies] Last: Leonardo94, function `main' is a special function, it should be declar... (by masterziv)
FULL CONDITION FOR A QUEUE
 
In a circular queue of size n, do we declare the queue full if we have n-1 items in it? Why do we do so if we can declare it full when it is actually full, i.e....
[4 replies] Last: is the concept correct???..so it is possible right?? (by vgoel38)
I need help please.
 
#include<iostream> #include<conio> #include<cstring> struct node { int data; node* next; }; class stack { private: node* top; public: ...
[1 reply] : Possible solution: change void main() to int main( int argc, char* ... (by Fransje)
Quick Question
 
is there a difference between writing out if (v_var == TRUE) or if (v_var == FALSE) vs if (v_var) or if (!v_var) or is personal preference?...
[3 replies] Last: ty (by snaxpax)
by cribar
Sum of numbers (looping lab)
 
Hey everyone, I've been working on this lab for my CS1 class the last few days and I'm embarrassed to say I'm completely stumped and it's only the third week. ...
[1 reply] : i am writing a bit help for you... int number; int sum =0; do { ->... (by HiteshVaghani1)
by Z feng
String Compare Function
 
Come with dumb question again :( Program is a C function to compare a string to another for equality of content. Function prototype: int myStrCmp(const cha...
[2 replies] Last: lol Thank you so much! You are right...they are stupid mistake..... (by Z feng)
Max/Min, is there a better way I can do this?
 
Below is the program I came up with, it is supposed to max/min/average 6 user-entered numbers: #include <iostream> using namespace std; int main() { ...
[1 reply] : In fact the program is fine. As for me I would write it the following... (by vlad from moscow)
overloaded operator+ and converting time
 
What I am trying to do is add seconds to my object and return my object in a hh:mm:ss format. I am not sure how to convert the total seconds into the proper ...
[1 reply] : I did not test but hope the code below is correct. const Time24 Time... (by vlad from moscow)
by x4C1Dx
How do I check the type of a variable
 
I am making a simple calculator, but I want to check the type of a variable, to see if it's an integer or a double, is there any way to do this?
[3 replies] Last: #include <iostream> #include <type_traits> int main() { int i = ... (by JLBorges)
by Hyl
Help with syntax!
 
Hi guys, I did a simple 'for' loop for an ODE and I can't figure out what's wrong with the syntax. Hope someone could help me out here, thanks! #include <...
[2 replies] Last: Oops, missed that out! Thanks! (by Hyl)
by noo1
How to declare a variable that accepts a character input from a user
 
Hi everyone. As my nick indicates, newbie here. Please help if you can. Tks. This is what I'm trying to do: Write a program which accepts two integers fro...
[10 replies] Last: Awesome...this is what I came up with. (but sure wish someone would h... (by noo1)
psudo random number generator help
 
Hey there again my fellow coders; I seem to be getting stuck on something. Here is what I've got to do: 1. seed the random number generator 2. generate ...
[18 replies] Last: I copied the code; trashed the original project file and started again... (by MrHatchi87)
by Tate
Selection Choices with "Switch Statements" Not Working Correctly
 
Hello, I am having trouble figuring out how to set up Switch statements to display a caller's choice of Dr.'s. Most of the code works as it should, but I st...
[5 replies] Last: At first I'm thinking, "What the heck are code tags? " I'm a newbie he... (by Tate)
Loops
 
I'm having an issue with my program. I would appreciate all the help I can get. I wrote out the program. When I run it ... It will propmted for 2 names, ask ...
[1 reply] : Couple of major things I'll point out, though I think there are some o... (by freddy92)
Repeat a question until user answers correctly
 
I am writing a program that generates random numbers for elementary student to practice their multiplication. If they answer incorrectly I want to them to try a...
[3 replies] Last: @ccsdude Your hint worked. I enventually got it to work. At first I k... (by joshsmith01)
by jual
Array problem
 
I just started learning C++ this week, and I've been experimenting with different concepts. I wrote the program below to see what happens. Eventually, I want to...
[8 replies] Last: Thank you for the explanation cire, Cubbi and vlad from moscow. It rea... (by jual)
help overloading constructor
 
i'm having problems here, i don't know what exactly i'm doing wrong. i'm supposed to overload the constructor and call them both but each time i run the program...
[9 replies] Last: thanks vlad for the help, the teacher just want us to overload the con... (by Kronolynx)
September 2012 Pages: 1... 2021222324... 62
  Archived months: [aug2012] [oct2012]

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