Beginners - August 2010 (Page 8)

what does & do as argument?
 
I stumbled on this piece of code earlier (don't remember where, so I duplicated it here). It outputs 6. What I don't understand is how. Can anyone explain pleas...
[4 replies] Last: For standard types the overhead of copying the value is negligible. Th... (by Kyon)
by Kyon
String concatenation
 
Hey forum, I've yet another question, this time, regarding string (literals). The question I have is, when I use tri- or digraphs, I may not be able to put ?? ...
[2 replies] Last: I'm talking about string (literal) concatenation. Not escape sequences... (by Kyon)
Merge Sort
 
Hello. I am trying to create a merge sort program, and am having trouble with passing around arrays.This is what I have so far: #include <iostream> using...
[6 replies] Last: //int* mergeSort(int list ) list is a pointer, so in this way you can... (by ne555)
by pdgui
A question about stack memory using recursion functions
 
Hi, I'm reading this interesting C tutorial: http://sundog97.tripod.com/tutorial_c/chap05.html Here it explains the use of stack memory when used recursi...
[15 replies] Last: So deep. (by Skillless)
by effizy
Practical C++ language tips!
 
I am new to C++ or any form of programming language. Would appreciate any practical tips on: - approaching problems - techniques on writing codes - rule of t...
[1 reply] : Please don't post your question more than once... Thanks (by attaboy)
arrays as function parameters
 
i encounterd the following code in the c++ toutorial about data structures, but shouldnt void printmovie (movies_t movie); be void printmovie (movies_t mov...
[2 replies] Last: OMG, never thought of that, thx u so much dude (by Errratic)
new to C++
 
hello everyone, i am 27 years old and new to this C++ stuff basically i have just bought the book few days ago and such, so i would love to be able to talk to s...
[5 replies] Last: Google your minor questions and you will get last discussion of cplupl... (by Mazd)
Restart program
 
Hi guys i have a question i am currently doing a calculator program is there any way that after finishing one calculation i give the user an option to eithe...
[1 reply] : int main(){ while(true){ cout << "look mom, I'm calcula... (by hamsterman)
Arranging a word in all possible combinations
 
Hello all. I am just starting to learn C++ but have moderate experience with C. I am using the Dev-C compiler for my program. The program I wish to create wi...
[5 replies] Last: i got it working before reading your reply with int order(string... (by Chazzmundo)
by hybzik
undefined reference to function - can't find cause
 
As part of a larger program I've started writing some stubs of a few functions, but even before I've filled in these stubs I'm already getting an undefined refe...
[4 replies] Last: The problem was with the IDE I was using. (by hybzik)
by luchie
trouble with pow( int , 2)
 
Hey, I am having trouble powering numbers in assigned array and would appreciate it if someone could give me some guidance on why I am getting the wrong results...
[1 reply] : int z = number ; 'number' is a string. Therefore number is a si... (by Disch)
First question
 
First of all hello to everyone, I'm new to this forum and also to C++: I have this question/problem.... I did this program but the problem is that when I inpu...
[4 replies] Last: Now i get it ....... Thank you very much for the time consumed to answ... (by orbaneqtrx5)
floating point precision problem in comparisons
 
Hey all, This is probably trivial, but I have some code that is supposed to compare the elements in two different dynamically allocated double arrays. Even...
[3 replies] Last: Thanks! I don't know why I didn't think of that. It's been a few years... (by stavros)
by luchie
Squaring Array Numbers Question
 
I am new to programming and is stuck on a excersize from the book. Basically the user gets to input the number of digits they want to use in a number. They then...
[4 replies] Last: thanks a lot for the responds, but when I do change the string back to... (by luchie)
Can there be a vector of references?
 
Hi guys. Is there a way, beside using pointers that an object be kept in two vectors? For example, the following code: vector<int> a; vector<int> b;...
[8 replies] Last: You can get a reference or a copy of the element in the container. I'... (by moorecm)
Logic solving Monty Hall problem?
 
One of the programming projects in my C++ book has me working on a simulation of the Monty Hall problem (http://en.wikipedia.org/wiki/Monty_Hall_problem). My...
[4 replies] Last: The logic of switching the doors to improve your chances is correct bu... (by cnoeval)
unsigned short- how to read from binary data??
 
If someone can write me how to read with fscanf function value from the binary file, if it is unsigned short. An example. please. I urgently need that. I know h...
[4 replies] Last: I still have a problem with reading data. I can not believe some data ... (by superworm)
Winapi, Win32 and QT!
 
I was wondering, yhen I go visual, what would be the best shot? What is the difference between those "things"? Can someome please explain?
[2 replies] Last: I suppose wxWidgets because: http://wiki.wxwidgets.org/WxWidgets_Compa... (by Mazd)
pointers chara
 
hay guys, i have this doult with pointer to charas, see chara* somepointer="hello"; in the tutorials it states that the value of somepointer should ez...
[4 replies] Last: but then somepointer should equal to somepointer +0 but dosnt that eq... (by hamsterman)
what should i do to make a program like these
 
Can you please help me make a c++ program that would ask if how many bills and compute its total, and then ask how many coins you have, and then, also compute i...
[2 replies] Last: This solution for my understanding of your topic. //start #include<... (by Mazd)
August 2010 Pages: 1... 678910... 28
  Archived months: [jul2010] [sep2010]

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