General C++ Programming - February 2013 (Page 3)

by shakib
a value of type "" cannot be used to initialize an entity of type ""
 
#include "Deck.h" Deck::Deck() { card = new Card* ; Populate(); } void Deck::Populate() { clear(); for (int i=Card::Clubs; i <= Card::Spades...
[4 replies] Last: Thank you very kindly, your answer is really helpful. (by shakib)
HELP! My computer restarts every time program is compiled
 
Hi! I have a weird problem, my computer restarts imidiately after program writen in dev-cpp is compiled AND run. When I run any program, it lasts about 1 sec...
[2 replies] Last: Thanks, upgrading to 5.4 helped:) (by rewriteris)
File Info Search
 
I am looking for a way that I could check the information of a folder and a drive, to show the data size and storage amount (KB, MB, GB). This is so that I can ...
[2 replies] Last: If you have a tr2 implementation or can use boost filesystem, the foll... (by cire)
I need some serious help with this
 
Write a program that will ask the user for results of an election. There are 3 candidates that get votes. The program should ask, for each candidate: the name (...
[11 replies] Last: I appreciate all the help. Thank you everyone for your assistance. (by dgood87)
Save big volume of computation results
 
Hi, I run some computations which give a big number of vectors (let's say 100 vectors, each one contain 2000 elements of type double). I want to save those d...
[7 replies] Last: Thanks yelnatz and L B. The file will be long, but not very big (below... (by dekeenfrance)
by rudy01
Static vs Dynamic memory allocation
 
Hi, I was just curious if there is a performance difference (e.g access time, speed, ...) between allocating static memory vs dynamic memory? For example, if...
[2 replies] Last: http://www.cplusplus.com/forum/windows/93660/#msg503297 (by kbw)
problem about taking data from web
 
Hi guys, There is a website which consist about over 500 emails in different pages. So it is 1 email per page. But I need to acquire all of them in a "mailla...
[3 replies] Last: thank you. that spider thing sounds interesting and useful. what I not... (by morphia)
Sortowanie w C++ Prosze pomocy
 
Mam na zadanie z informatyki posortowac te liczny od 0 do 1000. Nic nie mozna z tego usunac tylko dodac. Prosze pomocy!!! Jestem z tego lewy #include <cstd...
[no replies]
sorting names
 
hey guys !!! i have to sort the students according to their first and last names here is the code i have written so far ,, it inputs the first names and last ...
[no replies]
alphabetical sorting
 
this is my code: #include <iostream> #include <string> #include <vector> #include <algorithm> #include <fstream> using namespace std; int main(){ ...
[7 replies] Last: It's far easier to just use forward slashes for file paths... (by LB)
Help to add the loop
 
Can anyone help me when i run my loop display Output 5 4 3 2 1 the sum is 6(the answer must be 15) what is the code for a correct adding of the loop
[2 replies] Last: thx (by vatwomen0)
by DavPin
Dynamic memory allocation problem
 
Hello, I've been trying to get around my memory allocation problem for the past hour or so, but I seem to get nowhere. This code works well (taken from the ...
[7 replies] Last: Diid not you understand what I said did you? Show the full code that y... (by vlad from moscow)
card dealing assignment
 
This is my project im fairly new and found this and thought id try it, how wpuld i go about starting this program? this is a template and i have to finish the p...
[no replies]
atm bank machine
 
this is my header file #include <iostream> #include <string> using namespace std; class Account{ protected: string firstname; string lastname; i...
[no replies]
"Error:expected a declaration"
 
I had given an assignment and i designed this code there is "Error:expected a declaration" but i can't understand this error and unable to remove it, please hel...
[1 reply] : I think that the compiler reports the module and the line where the er... (by vlad from moscow)
how do you open a file with argv (1,2)
 
this is what get called to do everything, but I can't figure out how to open my two files with argv and argv as the parameters heres my code: void comput...
[25 replies] Last: alright, thanks (by cookimnstr123)
Strings
 
Hey this is my class: class boys { private: string h2bac ; string h4bac ; string h6bac ; string h2bnac ; string h4bna...
[9 replies] Last: You're welcome :) (by MikeyBoy)
default arguments
 
Can C++ default the values of a methods areguments? Ie. foo( int start, int end ); I'd like to be able to call this as: foo( 123, 456 ); // Do foo on e...
[3 replies] Last: As your parameters have the same type int I do not see any way to achi... (by vlad from moscow)
Array mem assignment
 
hi, i have little confuse between pointer and array. Below my code is shown int main() { int rx ,i; int *p; p=rx; printf("rx : %x\n",rx); ...
[2 replies] Last: According to the C/C++ Standards Objects of array types cannot be mod... (by vlad from moscow)
grade counting to letter
 
help me what is wrong in my code it didnt display the letter. switch (score / 10) { case 9: // 90 - 99 ....grade = 'A'; ....break; case 8: // 80 - 89 ....
[1 reply] : If you want to display the value of grade you will have to print it. ... (by Peter87)
February 2013 Pages: 12345... 43
  Archived months: [jan2013] [mar2013]

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