Beginners - April 2011 (Page 54)

need some help about the program i don't know what is the error in this program anyone can tell me plz
 
#include <iostream> #include <string> #include <vector> using namespace std; class Person { private: string name; ...
[4 replies] Last: You need to invoke the print method in order to print the informatio... (by Mathhead200)
by rever
Static function?
 
Hi all! I want to define a method which can be used by all the classes in my solution, like a global variable but a "global method". I have been reading and ...
[16 replies] Last: No problem. I'm glad it worked. A namespace is just a way to avoid ... (by Mathhead200)
help writing functions
 
can someone please help me write these functions, i have looked online and i am having trouble finding how to write them. Thanks class List { private ...
[2 replies] Last: @jazzyjely: i dont understand int capacity variable use what to do ... (by Conan)
getline
 
Hello, I want to save a string with " " so I cant use the normal cin>>variable; right? But If i try using getline(cin,variable); more then once I succeed only...
[6 replies] Last: gets() is very unsafe and should never be used: http://en.wikipedia.or... (by filipe)
Temperature Conversion Program Errors
 
I have an assignment to write a program dealing with temperature conversion.I have to prompt the user for the scale and degree to be used and display both F and...
[4 replies] Last: Works perfectly! Thank you for your help! I really really appreciate i... (by llind212)
Container Concept
 
Hello I'm new to this forum and was wondering if I could get some help since I'm having trouble with an assignment for my C++ data structures class. I'm unsure ...
[4 replies] Last: coder777 thanks for your help again but I had a friend walk me through... (by itpatriot)
Reverseing a string using pointers
 
Yes this i an assingment for my C++ class. I just need a little help figuring out how to point to the end of a string. Basically we are suppose to create a char...
[14 replies] Last: Thanks for your guy's help. I think the teacher was just wanting to em... (by jokerfwb)
Does anyone know what this thing is called, and how to make it appear?
 
So I'm trying to install SFML, and I'm using Visual Studio 2010. I'm watching a tutorial video on YouTube, and the person showing the tutorial is using a certai...
[3 replies] Last: Go to the right hand side of the toolbar, and click the option control... (by closed account z05DSL3A)
itoa or bitset?
 
I want to transform decimal to binary char str ; for(size_t i = 1;i <= 256;i++) { std::cout<<itoa(i, str, 2)<<"\n"; } or std::bitset<9> a; for(size_t i ...
[4 replies] Last: I don't think a generalized function has to be slower but I am pretty ... (by moorecm)
Code::blocks problem
 
I installed Code::blocks without the MinGW. Then i installed separately MinGW in D:\ - i instructed Code::blocks to use MinGW from Settings -> Compiler and Debu...
[4 replies] Last: Guys thank you for your help. Athar i followed your link and it worked... (by HelpWanted)
#include question
 
Hi, what is the difference between "#include <iostream>" (which works) and "#include <iostream.h>" (g++ complains about not finding iostream.h). Christina...
[2 replies] Last: Thank you - I didn't expect header files without extension, so I thoug... (by chrrossmanith)
by rever
Delete object and its pointer
 
Hi! I have been reading about how important it is to use the delete operator to avoid memory problems. However, I was wondering if it is possible to remove a p...
[5 replies] Last: For your first question... If you have allocated your original array ... (by firedraco)
by tonnot
How works MAP memory allocate?
 
Each time I give data to a MAP , what's happen ? Can I reserve some memory to help MAP ? Thanks
[1 reply] : Define 'MAP' (by Bazzy)
Outputting the sum of the digits of an integer
 
The program I am working on is supposed to receive an integer as input and output the digits separately and the sum of the digits. I can ouput each digit separa...
[1 reply] : sum = sum + digit; This code is adding the int sum to the char... (by Mathhead200)
Temperature Conversion Program
 
I'm a beginner student learning about functions and do not understand them fully. My assignment was to write a program that deals with temperature conversion. M...
[14 replies] Last: No problem. Feel free to let me know if you have any more questions. (by Mathhead200)
C++ alphabet animals failure, switch, case, break
 
I use Dev-CPP aka bloodshed What I have to do to get this C++ right? I also did all the letters. Have the user enter a letter for a minimum of 10 letters, sen...
[4 replies] Last: Lol, I copied your code and forgot to add the semicolon on line 7... :... (by Mathhead200)
cin >> but give it a wrong type.
 
Hi, So I'm not interested in how to fix this, but rather I want to know why it does what it does. When you give it a letter (instead of an integer that it ...
[3 replies] Last: Found this with some quick googling: http://www.cs.hmc.edu/~geoff/cla... (by closed account Lv0f92yv)
file concept
 
hi, i have doubt in c in file concept , let put my example. i have created example # include<stdio.h> FILE *fileptr; fileptr = fopen("c:\emp.txt","r")...
[no replies]
friend declration
 
If class one has to access to private data members of class 2,then friend declration should be given in.. Class 1 Class 2 Main Both Class 1 and Class 2
[1 reply] : class Class1 { ... }; class Class2 { friend Class1; //Dec... (by Mathhead200)
Quicksort difficulties
 
I've tried to programming Quicksort several times but even during my class at school to trying to setup netbeans at home, I can't get it to run. My teacher has ...
[2 replies] Last: I used codepad.org due to compiler issues and I got this after adding ... (by cbushee09)
April 2011 Pages: 1... 52535455
  Archived months: [mar2011] [may2011]

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