Beginners - April 2010 (Page 29)

how to pass a vector as a parameter to a function?
 
as the title states
[11 replies] Last: Generally (such as in the STL), vectors and other containers are passe... (by tummychow)
by Null
Const functions?
 
Hello, what's the difference between class myclass { int fx(int); //const not used here }; and class myclass { int fx(int) const; // const!? }...
[3 replies] Last: Constant methods are methods that logically do not alter the state of ... (by moorecm)
by swAn
why memory allocation is necessary?
 
i have just started learning data structures and was trying to implement linked list. i wanted to know why memory allocation is necessary for the pointer var...
[6 replies] Last: You should consider playing the lottery then. I think you'll be a win... (by jsmith)
by iri
Swapping integers, pass by const ref: is it possible?
 
I am trying to go over the exercises in the book by Duffy, Intro to C++ for Fin. Eng. In chapter 6 he asks to write code for a function that swaps two argume...
[10 replies] Last: Note that the following works (at least for me but I don't find a reas... (by m4ster r0shi)
by dasman
Char array to int
 
Can anyone point out whats going wrong with my code. I have tried to convert an integer (-998) to a character array in hex form and want to read it back as t...
[6 replies] Last: Thank you master roshi. that solved my problem. now all i have to do i... (by dasman)
by summey
having trouble trying to adding x to every other element
 
I made hit this far but i need to fig out how to add x to ever other element. any help would be grateful thank you ! //PRINTING CONTENTS OF ARRAY and ...
[15 replies] Last: yeah i was confused my assignment has me doing array pointers etc... s... (by summey)
problem with coding
 
Hello, i have an exam and i need to make an homework which is: Is an array of integers. To compile and display a different array containing only the even po...
[2 replies] Last: I would also read about the modulus operator (%). That might help you ... (by oghmaosiris)
is this valid syntax?
 
hi all ijust written this little piece of code and it compiles withou error but i want to know if it's valid syntax? bool literal(char &achar) { switch...
[5 replies] Last: @helios, i did, it worked but i wanted to be sure. cause maybe it migh... (by jinjin12)
Adding a texture to a mesh in dx9
 
hi there, im new to programing in c++ an directx9. i cant seem to figure out how to put a texture on to a mesh, i used blender3d to make the .x file, just a sim...
[3 replies] Last: thanks guys, ill try going GameDev. also didnt think of the texture... (by cantstopthechase)
by Tripic
Problems understanding OOP
 
ok i am trying to use oop to create a player class but i am having a problem passing the player class through a vector. Im not sure what i am doing wrong any he...
[4 replies] Last: This can compile if you remove the i and leave it as Pl.push_back(Pl(... (by helios)
getting seg fault and not knowing why
 
hi guys i made a function to create tokens from a line of input and i push those tokens into a vector of tokens. but i keep getting seg-faulted if the if the st...
[2 replies] Last: omg....thanks alot man!!!! that works. i would never have been able to... (by jinjin12)
getting error while trying to pass an array by reference
 
I'm trying to create a program that will print the coefficient of lift by reading in a data file which contains the flight path angle and its corresponding coef...
[8 replies] Last: yes, i just noticed i made that mistake and fixed it. it should be: ... (by heynow12)
File I/O Issue
 
Ok general prog overview. -read records from text file called hours.txt -stores records in vector of datatype emp -emp is custom class with with constructor ...
[1 reply] : Got an update on it. When first execution of RPT goes fine, but the st... (by Dreadfrost)
by sanji
vector of inheritance class
 
hi, im really new to C++ coming from a java/c# background and got stuck with some basic problem... i try to create a vector of objects inheritted from the...
[1 reply] : You are constructing the objects incorrectly. What you had looked mor... (by kempofighter)
The meaning of the collon within a class definition
 
Hello everybody. I am trying to understand the following code: class CSimpleDict { public: CSimpleDict( HINSTANCE hInstance ) : m_hIn...
[6 replies] Last: Thank you all for the help. tummychow, I hadn't seen your answer wh... (by denisealves)
Is this possible to code?
 
I need a program that, once installed, users, including administrators, cannot change the settings or uninstall it without a password. Why do I ask? I'm a co...
[3 replies] Last: I can't imagine that it would be particularly effective. If you coded ... (by tummychow)
<iomanip> and setprecision
 
Im tryna get my code (as seen bellow) to print both the variable "jax" with two decimal places, and the full value opf the variable "jax" so the out out shou...
[3 replies] Last: You are obviously learning c++ so stick with the c++ headers please. ... (by kempofighter)
Run-time check error..
 
Hello guys, Im a very inexperienced programmer..Ive only used this C+ once and Im not very good at it whatsoever..However, Im supposed to be taking data from a ...
[2 replies] Last: You created batch, but you didn't set it to anything. So when you t... (by oghmaosiris)
openCV in DevC++
 
Hello friends, I am new to C++ and openCV. I have installed opencv and devC++. I scripted a program in it. But when I run it there is no output,whereas it sh...
[2 replies] Last: 4) Dev C++ is outdated. Use wxDev instead. (by tummychow)
simulating diabetes
 
I need help writing a c++ program for an assignment. The assignment is as follows: A simple differential equation that describes S (sugar in grams pe...
[4 replies] Last: he forgot to attach the equation for S and I. Equation 1) dS/dt = ... (by ptj1025)
April 2010 Pages: 1... 2728293031... 35
  Archived months: [mar2010] [may2010]

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