Beginners - November 2012 (Page 32)

Need help with strings
 
Im making a chat program and i want to have commands that start with '/'. So for the command /nick name , i need help breaking the string up. I need some...
[2 replies] Last: First of all you can define string literal "nick " as a const pointer.... (by vlad from moscow)
Interdependent Class design question
 
Hey guys, I have a simple design issue. I need to figure out a way around this. I am programming a simulated railway, which is made up of stations. Each ...
[3 replies] Last: I tried various designs to get around this issue, but wasn't able to ... (by TheIdeasMan)
constructor problem
 
This is probably a dumb mistake but I am making a vector class to take negative indices. I am having a problem when implementing the constructors. Here is my he...
[2 replies] Last: Ahhhhh! Thanks. I knew it was something dumb... (by WesleySnipes)
More arrays! And an overloading question
 
The code: #include <iostream> #include <cstdlib> #include <ctime> #include <climits> #define SIZE 9 using namespace std; /* Develop a function that f...
[19 replies] Last: I have one function named Difference, that can be sent both doubles a... (by TheIdeasMan)
by xfecto
Calculating the average score
 
I am going crazy with my code...but I can not find why the program is not calculating the average score at the end of the program. It is suppose to work where a...
[8 replies] Last: Line 116: Should this be an if statement? The value of mainLoopNo isn'... (by TheIdeasMan)
by alext
Letting the user add and remove data from an array
 
Hi, I'm currently working on this assingment where I will create a wheaterdatabase. The user will have the option to add and remove values from the array conta...
[1 reply] : One unrelated suggestion is that you achieve this menu through swit... (by Dissimulation)
why this is always returning true ?
 
hi my problem is that i want to return true when the string are same when they are written in backwards like noon=noon or radar=radar. if they arent same th...
[8 replies] Last: moschops like this ?? int j=0; for(int i=length;i<=0;i--) { b =A j... (by Aqeel Abbas)
How to remove a character
 
I have a program that gets a city name from a file, but there are some that have a underscore between there names, how do i remove them by using a function. ...
[5 replies] Last: as you're using sizeof(" ") when I assume you meant to use sizeof(' '... (by DesiredNote)
Loops
 
OK, I sort of understand loops but I don't understand how they differ. while loops do loops for loops If you can, I would like an example of how they ar...
[2 replies] Last: Wow. didnt know that was there... Thanks a lot! (by closed account LN7oGNh0)
Error 2 error LNK1120: 1 unresolved externals
 
hi friends i have this error (Error 2 error LNK1120: 1 unresolved externals C:\Users\Aqeel\Documents\Visual Studio 2010\Projects\Aqeel string 3\Debug\Aqeel st...
[6 replies] Last: oooo man :) thanks i got it (by Aqeel Abbas)
Getting 'no matching function' trying to use new keyword
 
Hey guys, I'm getting a weird error that's preventing my code from compiling and it's driving me nuts. In my class 'PBQueue' (pointer based queue), I hav...
[7 replies] Last: [quote=jojo212] "What I did was I created two constructors for Passeng... (by closed account zb0S216C)
displaying 2D array correctly
 
Hello fellow programmers. I am trying to display a 2D array that displays randomly generated numbers that fill out in rows and columns. At the end of each row i...
[3 replies] Last: Yep it is. Just think about it a little, I'll leave it to you to figu... (by blueberry)
How to call a template class?
 
Hi, I'm writing my first template class for an assignment, and must admit I'm really having to feel this out as I go (it would help if we were given notes on...
[4 replies] Last: lol, ty. :) Will reply to this again, when I have another chance to r... (by kuriolis)
Help please!!
 
I have a text file that contains integers, I need to read them in and put them into a binary tree and then display the sorted binary tree, using recursion...I a...
[no replies]
Output Problem,
 
List List:: mergesort(List m) { if(m.count() <= 1) return m; else { List l,r; node* temp = m.head; node* ptemp = m.head;...
[8 replies] Last: Waqar, It seems as though you may be writing K&R's "C" language. may I... (by Incis B)
by Maissa
An array and subprogram problem
 
so basically i want a program that will give me the smallest number of an array , this was easy for me until i read that i must use a subprogram called "min" t...
[2 replies] Last: Yes you did very much thank you i get it now i didn't need the max but... (by Maissa)
Expression must be a modifiable Ivalue?
 
I am trying to put the data in buffer into sbuffer.Message. However, sbuffer is underlined red and says expression must be a modifiable Ivalue . Here is the r...
[2 replies] Last: Thanks you! (by nano511)
C++ Constructors
 
I started learning programming last year and I've been studying .NET since then, recently I decided to try C++ as well. I have the following code #include <i...
[1 reply] : http://www.parashift.com/c++-faq/empty-parens-in-object-decl.html http... (by Catfish2)
Array, stack, heap question
 
#include <iostream> #include <cstdlib> #include <ctime> #include <string> using namespace std; bool controllaIfSorted(int array , int dimensioneArray)...
[7 replies] Last: Looks like the default value for the type is returned? What's retur... (by cire)
Set of Item ( last question )
 
here is the code that done by me #include <iostream> #include <string> #include <conio.h> using namespace std; template< class T > class Set{ privat...
[3 replies] Last: item++; and item--; change the value of item , by adding or remov... (by Catfish2)
November 2012 Pages: 1... 3031323334... 75
  Archived months: [oct2012] [dec2012]

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