General C++ Programming - April 2012 (Page 9)

by Anomen
Warnings with std::vector
 
Hi there, I've got some warning when I try to use vectors.. Here is the following code: //******* //test.h #include <iostream> #include <vector> using na...
[18 replies] Last: First of all thank you for your answers. Secondly, I SWEAR you that I'... (by Anomen)
change output after miliseconds in mfc/sdi
 
developing a project in vc++ mfc/sdi....i want that my array changes after some miliseconds.....i have to make combinations of array so it is a very big proble...
[1 reply] : You have to start a timer and count milliseconds, and after some out h... (by TheDestroyer)
by AARGH
why so many languages when C / C++ is faster and can do anythning?
 
why would anyone bother with other higher level languages, like java, when C code runs multiple times faster and is powerfull / expansive enough to do anything?...
[6 replies] Last: Actually the main reason for the existence of many languages is "gener... (by TheDestroyer)
by Eyad
Linked List
 
Can i return the value of a linked list as 1 integer? for example: ->5->8->3 represented as a decimal number 583 where it is equal 1 integer NOT 3 integer...
[6 replies] Last: Ha, its all good. Everyone has been there at one point or another. (by willatSMU)
n No of loops (1,2)
 
hi, i have a problem to implement...i want a recursive function or any other technique that can get the work of n loops... for.e.g. for(i to t) { fo...
[25 replies] Last: Good try viliml. What you probably forgot is that we need a reference ... (by Vlykarye)
How to define "
 
Is there anyway to define " ? Example: #define apos " #define CONCAT(a,b,c) a ## b ## c #define INDIR_CONCAT(a,b,c) CONCAT(a,b,c) #define CONDITIO...
[11 replies] Last: I know this way but the thing that i want isn't like this. Thanks anyw... (by Kitiara)
checking military time
 
hey can someone help look over my code? I am trying to turn normal time into military time for a bigger program. [void Beux::get_times() { cout<<"What ho...
[4 replies] Last: Just validate the user input for depart_hr to accept any integer betwe... (by clanmjc)
template + Inheritance.
 
Bros I have got into trouble,would be really happy if someone help me.. Actually I have two classes and they both are template class. How do I make inherita...
[7 replies] Last: I'm taking a guess here. 1) thing it might be saying is that there is... (by clanmjc)
by arooj
Using a Class for an Employee Salary calculation problem
 
I'm having problems constructing this program that calculates and displays a new employee salary. It uses a class, the Employee class. I am not as familiar with...
[1 reply] : The errors really give you all the info you need. Error1 - look at th... (by rollie)
const_cast
 
trying to understand the usage of const_cast const char* text="bb"; (const_cast<char&>(*text))='a'; cout<<*text; Generate runtime error , another que...
[15 replies] Last: Yes we thought about using mutable, but we wanted to ensure that later... (by clanmjc)
by TiiG
Very Difficult Problem that requires Dynamic Prog.
 
You are given numbers N and H. H=floors of the building N=number of telephones. Your must find the MINIMUM amount of throws you need(A) to find out the highest...
[5 replies] Last: For N = 2 and H=10: 1 2 3 4 * 5 6 7 * 8 9 ... (by cire)
Doubly Linked List
 
So I have an online C++ class and its really getting the best of me right now. I understand completely how doubly linked lists work. My whole problem is just im...
[4 replies] Last: I am learning linked lists too and just wrote my first doubly linked l... (by nathan10)
Failure to reopen a file to update/append new data.
 
I sorted a file to find the file's 4 numbers that have the highest frequencies, wrote the 4 numbers on the screen, then wrote them in a file using: [c++]...
[5 replies] Last: Wow! Thanks, how stupid of me. Problem solved. (by therry1)
problem in C and C++ connection
 
Hi every body, I have a situation here, I have a code in C++ , a GUI and this GUI linked to a C code program which do some calculation, I find out there is some...
[no replies]
How can I sort a vector?
 
I wrote this to sort a vector using a template, but it won't work correctly. When I include the return a line, it won't compile at all. #include <iostream> ...
[4 replies] Last: Thanks a lot! I know some of the things in my original code were stupi... (by Cloudboy)
How to exclude numbers from an equation?
 
For example I used an array to get 5 test scores from a user and then I have to find the average excluding the highest test score along with the lowest test sco...
[4 replies] Last: Got it! it was simple but I didn't know, now I do thanks! (by Chapin247)
C++11
 
hey fellow programmers, anybody happen to know a good C++11 tutorial. You know, moving form C++03 to C++11, the problems, new techniques and their effective i...
[no replies]
by tjr28
C++ removing of all occurrence of some character from string
 
i am new to this forum. i am in the process of converting the code from SAS to C++. I am a intermediate C++ developer, and SAS beginner. We have 'COMPRESS' func...
[1 reply] : http://cplusplus.com/reference/algorithm/remove/ (by ne555)
by Bouya
Socket
 
hi Can any one explain for me what's really the role of bind and connect after creating a socket .? Thank you in advance
[1 reply] : man 2 bind http://linux.die.net/man/2/bind man 2 connect http://linux... (by Peter87)
Expanding Array
 
Hello, how can I expand array? for example let's say I have array with 3 elements int a = {1, 5, 10}; how can I expand him to 5 elements but make...
[2 replies] Last: An "expanding array" is called a vector, and an implementation is avai... (by Gaminic)
April 2012 Pages: 1... 7891011... 49
  Archived months: [mar2012] [may2012]

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