Beginners - November 2009 (Page 15)

Are immutable strings better?
 
and why? the string class in c++ is not immutable but in java it is, my lecturer said he prefers immutable strings, is there any reason that immutable strings a...
[1 reply] : Well that depends on what you're trying to accomplish. To make a stri... (by Return 0)
Array with random numbers
 
Hello all. I am just learning about arrays now, and I have a small problem. I have to create a C++ program that will: - Declare an array named rNumb of 50 com...
[7 replies] Last: why would I put i < 50 -1.. wouldn't that equal 48 your right my... (by gcampton)
returning multi type data with one function
 
Can I write a function that takes not just one type and/or returns not just one type. Like; function f1 takes both integer and string and it determines in f...
[6 replies] Last: Thank you so much Bazzy. That is really what i want. I think i should ... (by akayrak)
Integer number
 
If i want to remove last digit of a number: I will use: n/=10 What about removing first digit of a number?
[6 replies] Last: This would probably be the fastest in the general case (pardon the tem... (by jsmith)
Bitwise
 
How to begin working for the answer inthis qns? It looks messy... #include <iostream> using namespace std; int defaultParam (int x = 30, int y = 20, int z...
[7 replies] Last: Wrong. Default parameters need to appear in either the definition or ... (by mcleano)
craps game in c++
 
i was asked to make a craps game using empty console in c++ roll two dice. Each die has six faces representing values 1,2...., and 6, respectively. Check the...
[7 replies] Last: nekomata, you seem to be struggling with how to use functions, more sp... (by jRaskell)
by sdot
output non ascii
 
Hi I am writing a program that the inputs characters from another file and is supposed to output them to the screen. I am trying to make it so that the output o...
[4 replies] Last: Perfect. Thank you for helping me figure this out. (by sdot)
Still stuck on white spaces
 
My assignment asks me to read in a .txt file, change all text to uppercase and then delete all the extra white spaces. Code so far: #include<iostream> #incl...
[3 replies] Last: Since it is a loop, you can make an iteration modify the behaviour of ... (by Bazzy)
Kinda Lost on Program
 
Ive been working a compression calculator and am struggling because after my program accepts the first input inside an "if" statement, it quickly skips through ...
[1 reply] : cin >> P1; cin >> P2; cin >> P3; All attempt to read an int (gues... (by jsmith)
by gedas
list
 
hy guys im having a problem im unable to implement main test program to read in a list of meanings and fully test the meanings. h class and list.h class her...
[1 reply] : What do you mean? Have you even tried making your own program? (by closed account S6k9GNh0)
Impossibel infinite loop
 
So, I am having an infinite loop, without any loops (all the loops were commented out to try to figure out where the infinite loop is). I simply don't know what...
[5 replies] Last: Ahhh... Thank you. (by JohnsWilliams)
I/O program major issues
 
NO LONGER "major issues". I have completed the core part of the program and need assistance to figure the rest out. I'm at a complete loss due to teacher and bo...
[19 replies] Last: I'm not sure to put it either after the if-else statements or after t... (by Bazzy)
Static Casting
 
If the inputs are 4.5, 8.6 & 9. #include <iostream> using namespace std; int main() { int x,y; float z; cout << "Enter three numbers: "; cin >...
[7 replies] Last: EDIT - oh blah I just saw the other question. Way to read, Disch. ... (by Disch)
Which Version???????????
 
Hello..... I am an old programmer (turbo Pascal) and i want to move into C now. After some research i've done, i end up very confused.... Which version of ...
[8 replies] Last: Grey Wolf : I stand corrected. george : why buy a nice, prebuilt, s... (by Duthomhas)
Problems with sprintf
 
CODE: //(...) char* metod=strtok(request," "); char* object=strtok(NULL," "); char* protocol=strtok(NULL,"\n"); object=strtok(object,"/"); char respo...
[6 replies] Last: If I do this: const char* protocol2; if (strcmp(protoco... (by esehacker)
Constructor
 
class Myclass { int x; public Myclass (int y) { cout << "This is great"; x = y; } int main () { Myclass hold = new Myclass(1); ...
[5 replies] Last: Thanks bazzy and firedraco and now it clear it up. (by kenryuakuma)
by fikri
control structures examples.
 
i need examples of selection control structure because im still confuse about it. anyone?
[6 replies] Last: The example in that tutorial is quite simple: if (x > 0) cout << ... (by Bazzy)
How to make an MMORPG (1,2)
 
Hi im not sure if this is the right spot to post this question but anyway... I want to make an MMORPG but dont know how to get started i dnt know what progra...
[39 replies] Last: @helios That would make sense... @jRaskell Almost certainly. It wou... (by chrisname)
by yumito
Keep main.cpp
 
is there a way to keep your main so you dont have to type #include <iostream> using namespace std; int main () { system ("PAUSE"); return 0; } ...
[16 replies] Last: Learn to touch type. Seriously. (by jsmith)
2d graphics engine (1,2)
 
Hi everybody. Im looking for a 2d graphic engine. I dont wanted to start over with oger or something equally big. Just a small engine where i can import my ...
[24 replies] Last: http://en.wikipedia.org/wiki/Fahrenheit_graphics_API#...and_disappears (by Bazzy)
November 2009 Pages: 1... 1314151617... 25
  Archived months: [oct2009] [dec2009]

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