General C++ Programming - September 2012 (Page 15)

Read input until some characters are encountered
 
Hi, I can do this in C, scanf("%s[^.^:^;^\n]", buffer) but I do not know if there is an equivalent input in C++ "cin". I have checked www.CPlusPlus.com...
[3 replies] Last: If you are wanting to just see if there ARE characters (that character... (by IWishIKnew)
programming
 
Problem Statement In preparation for an upcoming robotics competition, your company has decided to showcase its new robot. The competition requires the robot t...
[5 replies] Last: finished making it. its not that hard it only took five hours (by Aramil of Elixia)
Copy Constructor
 
I can open ifstream files from my main() that is not trivial. But when I try opening an ifstream file using a function I am having a problem reading from the if...
[4 replies] Last: ifstream inFile(TEST_FILE, ios::in) This creates an instance of ifst... (by BlackSheep)
Pointer to Static Member Function.
 
For the life of me, I cannot figure out how the method prototype differens in the slightest from what the compiler expects: class Packages { public: stat...
[4 replies] Last: thank you kindly. (by caibbor)
Help with random die roller please
 
So for my college class I am suppose to write a program that will roll a die, get a random result each time and allow the user to change the number of sides on ...
[4 replies] Last: you can still use srand, but you have to use a seed as explained in ... (by ljs)
Very odd calculation issue
 
Hi all, I've been troubleshooting this issue for about 2 hours now and just can't seem to figure out what on Earth is happening. I've narrowed it down to one ...
[5 replies] Last: Hello there friend, you realize that your the piece of code in the fir... (by ToniAz)
There's something wrong with this, but i can't figure it, someone help me ^^
 
#include <iostream> #include <conio.h> #include <iomanip> using namespace std; void main() { float harga, TL, TB, KPE, KPA; char jenis; cout << "in...
[3 replies] Last: First of all please use code tags, the <> button on the right. It is... (by TheIdeasMan)
After finishing a program, how do you create an executable?
 
I guess my question is, how does a programmer create their program into an executable file. I compile using Code Blocks and my OS is Windows 7. Is there a conve...
[9 replies] Last: as my exe file but it does not show anything until I put the pictures... (by Athar)
Using copy constructor
 
Here is my code : #include<iostream> using namespace std ; class A { private : int a ; public: A() { a = 0 ; ...
[6 replies] Last: Hi, A good place to implement a copy constructor is when your class h... (by Amol Bhave)
How to initialize functionpointers via a pointer
 
Is it possible to initialize (in below example) the function-pointer fp.p1 and fp.p2 by using a loop ? ... if yes, what should be coded at the first commentline...
[3 replies] Last: To be pedantic, that works on most common platforms, but is not a vali... (by Cubbi)
Where to begin with loop problem.
 
I must write a program that finds the temperature, as an integer, that is the same in both Celsius and Fahrenheit. The formula for this is F=(9/5)C+32 The...
[9 replies] Last: Read here http://www.cplusplus.com/forum/beginner/1988/ (by vlad from moscow)
SQL Express Server 2008 connection
 
Hi good morning everybody, I am currently trying to get to grips with C++ and am requiring to connect to an SQL Server the sample code i have found from google...
[1 reply] : SQLWCHAR is likely a wide char. So you need to prepend L: (SQLWCHA... (by coder777)
Display & Search text in Bengali Language
 
I am trying to develop a application that have the following features 1> It will be able to display contents of a doc and pdf file that will contain text in...
[3 replies] Last: Yes. You can download the Qt SDK. Google it. (by TheIdeasMan)
class inside namespace
 
Hey, I briefly did some programming with VB.Net and liked how easy it was to ping a machine using System.Net.NetInformation namespace. I've tried to imple...
[4 replies] Last: I understand what you mean now and as a result used a different way to... (by newbiedev)
recursion in queue
 
today in my university paper i got this code and was asked what's it doing?? void f(queue q) { int i; if(!isempty(q)) { i=delete(q); f(q...
[10 replies] Last: yes it is reversing.. thnx for the help guys :)....... (by vedanshu)
virtual inheritance not working with non-default constructors *SOLVED*
 
I've set up the classes so that the inheritance goes parent > child > grandchild. The problem is that when the child inherits using virtual, and the grandchil...
[3 replies] Last: You guys are awesome. Worked perfectly, thanks. (by octagon)
Need help with a function error *solved*
 
#include <iostream> #include <cmath> using namespace std; double theWindChill(double windSpeed, double tempC); //calculates wind chill using wind speed an...
[4 replies] Last: @Disch EDIT: dammit again vlad! XD But you answer is more comple... (by vlad from moscow)
Developer Sites
 
Does anyone know of some good sites where developers can post their code and have other people look at it?
[1 reply] : bitbucket.org github.com sourceforge.net launchpad.net (by closed account 1yR4jE8b)
Setting class variable
 
for (int x=0; x<7; x++) { //Setting x and y values of tiles for (int y=0; y<5; y++) { tile .x = x; tile .y = y; tile ...
[6 replies] Last: I fixed it, i just took out the parent and replaced it with x and y va... (by Angeljruiz)
by Handzo
TreeView filling
 
Hi every one. Wanna fill my TreeView object recursively. I have some troubles with that. Here is the code: struct tagElem { wchar_t tagName ; w...
[no replies]
September 2012 Pages: 1... 1314151617... 32
  Archived months: [aug2012] [oct2012]

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