Beginners - May 2009 (Page 4)

by nanger
what is the difference of these formal arguments in functions
 
func(int a ) func (int *a) template<typename T> func (T ) func (T *) ) what is the difference between array names and pointers when they ar...
[4 replies] Last: thanks! (by nanger)
copy constructors in inheritance
 
Can someone please explain how the copy constructor of a derived class should be written and how it works.
[2 replies] Last: Constructors should be written such that data members are initialized... (by Hammurabi)
STL vector
 
Hello, I do my first steps with the stl and so i star with the famous vector. I created a class who contain a vector. The vector can be use by class's funct...
[4 replies] Last: At a quick glance at your code, I see that there is no semicolon after... (by kevinchkin)
by alexch
Class function with string parameter
 
Hi, I'm trying to send a string to a class function. tmpClass.h: #include <string> using namespace std; class Tmp { public: void pointEasy(stri...
[4 replies] Last: Argh.. sorry guys, it's been a while since I wrote c++ code... guess I... (by alexch)
printf keyboard input on the other computer
 
i have connected two computers using null modem cable, i am connecting them using the serial ports. It is a console application using C++. How do i printf the k...
[no replies]
change headerfile function prototypes into class prototype
 
the following program compiles and runs with no bugs. i am using this program to gradually learn the different features of c++. i read about things on ur site a...
[7 replies] Last: i got it i had to use std namespace in the header file (by chopficaro)
by Laeion
Connect to website and read data
 
What code must be inserted in a Visual C++ console program which allows the program to connect to a website and read off a data from a box? For example, 1. ...
[1 reply] : Under windows, you might want to try Windows Internet: http://msdn.mi... (by Hammurabi)
deque initialization fails sometimes
 
Hi! The following program works correctly and without problems for some input values, for others it terminates prematurely and for still others it crashes with...
[4 replies] Last: I seems to me my mistake is an out-of-bounds access in line 91. I thin... (by gombozzo)
Problem with class function
 
I have a program I am working for the class I am taking. The goal is to create a default,paramertized and copy constructor for a resistor value. I have been una...
[3 replies] Last: Where do I start? void main() is not standard. main() is inside a ... (by helios)
reading text file into struct array through dos
 
so i made this code made already where it would take it files from I/O redirection, now i need to make it work through dos. where you assign the input file n...
[4 replies] Last: so i got it working most of it. but it only works though visual stu... (by makneltek)
How can I...? (1,2)
 
How can I use c++ for things other than file work? I bought a book on the language, read it, and found nothing in it for work with networks (IE. Internet), grap...
[20 replies] Last: Hacking the art of exploitation by Jon Ericson. Yep. That's computer ... (by helios)
by jaydr
Question about percision
 
I know that you can set the precision in the cout statement but can you set it for the cin statement. the reason i ask this is i am comparing the fraction part ...
[1 reply] : Referring to the code you posted above, replace lines 23-40 with this:... (by Hammurabi)
by hliang
Is it possible to input equations for a program?
 
Hello, I'm trying to make a program where a set of [v,t] data is inputted as variables needed for calculations in my program. So I was wondering is it pos...
[1 reply] : It's possible, but it's not easy. You need an expression parser. Ther... (by helios)
Repeating the output
 
Hey guys How do you keep repeating the output line after the user inputs the information Thanks
[6 replies] Last: #include <iostream> using namespace std; int main() { int x(... (by cplusplusisfunlol)
sorting a string vector
 
Is it even possible to sort a string vector? i have 4 vectors: player1 player2 player3 player4 each vector has 13 random playing cards in them, in this fo...
[4 replies] Last: I LOVE YOU! oh my god! that worked!!!!!!!!!!!!!! thanks so much!!!! (by cplusplusisfunlol)
c++ class problem
 
I'm working on a program using classes and seem to have hit a brick wall. Here is an example program based on my problem. class CItem { public: string Na...
[3 replies] Last: You're using your classes a lot like structs: * You don't have constr... (by Hammurabi)
using a string application-wide
 
I have a program that has 1 main.cpp and 3 .h files. one of the .h files gets the user's name (example code): string name; cout << "please enter your name";...
[6 replies] Last: beat me to my next question :) thanks! thank you so much! (by cplusplusisfunlol)
by dtbzz
math.h does not seem to work
 
Hi! I've been trying to use the example for the exp-function of math.h: /* exp example */ #include <stdio.h> #include <math.h> int main () { d...
[3 replies] Last: Thanks! (by dtbzz)
first prime number greater than 1 billion.
 
Hi guys I started learning c++ few days ago. I am reading c++ without fear. It is a good book for a beginner like me. however one of the questions is first p...
[5 replies] Last: In VC++ you need to go into the project preferences and turn off preco... (by Zhuge)
May 2009 Pages: 123456... 21
  Archived months: [apr2009] [jun2009]

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