General C++ Programming - June 2012 (Page 24)

by eag
How to solve this in C++
 
Hey, Can you please help me to solve this problem in C++ language. I want to write a simple app which when given a username gives the number of twee...
[1 reply] : Is this a project you're working on, or are you simply requesting that... (by AnthonyThoreau)
How should I interface different classes?
 
Can someone tell me some best practices for interfacing classes with each other? Here's a general example what I mean by this: There's a parent class called "...
[2 replies] Last: Hopefully you're saying by this that there is an abstract class that ... (by AnthonyThoreau)
Getting floating point exception ???
 
Here's the code :- /* ID: fazura_1 PROG: gift1 LANG: C++ */ #include <iostream> #include <fstream> #include <string> using namespace std; int i,j...
[2 replies] Last: Thankyou , it solved my problem !:) (by Maggi Iggam)
Insertion Operator
 
I need to to create a stream output as like cout; fout<<"number:"<<6<<endl; will write everything to a file which i have specified or default. I had came acros...
[3 replies] Last: It would make a lot more sense for the file to remain open, rather tha... (by Disch)
Please help me"Printing Elements of Array"
 
#include "stdafx.h" #include <iostream> using namespace std; const unsigned int ARRAY_SIZE = 50; // ========================== void Print...
[5 replies] Last: @Twistermonkey: Thank you!!! IT saves me lots of time. (by rayjeyz)
Radix
 
I have to implement a function for Radix: static void radix(Elem *arr, unsigned int n); // when using radix, Comp should be a class // with a static me...
[no replies]
While loop with OR trouble
 
I am still pretty new to c++, and Ii am struggling with the OR and AND operators. I am trying to build a loop into my functions so that it only accepts certa...
[1 reply] : Can you please use the code formatting tag to format your code. There... (by kbw)
confused
 
how to write a C++ program to print out hello world ten times using a for loop
[15 replies] Last: Thanks killjoys, it has no soul anymore! But at least it's still convo... (by Catfish2)
Recursion help
 
Hi, why does the base case end w/ a semi-colon, and I didn't know you can have void type do: return sum(...) this is the code I am trying to understand tha...
[1 reply] : You have to put a statement after the if statement that will run if th... (by Peter87)
Error
 
if (choice3 == 1) { string find; cout<< "Enter the registration no: "<< find; for(int i=0; i<sc_count;i++) { if (sportcars_Arry . c...
[2 replies] Last: basically its a car rental system and the user has typed in the car re... (by clarkey18)
why wont this work?
 
string Uname = USER; string Profile = USER; string path = "C:/Users/" + Uname + "/Documents/ArchStudio/HALO Saves/" + Profile; the path comes out as C:/Use...
[2 replies] Last: USER is clearly not defined anywhere.... (by LimeOats)
SDL collision detection!
 
Hello, i am trying to make some basic game that are using tiles. Until now it has gone pretty well and forward. But now im just totally stucked. I am trying to ...
[13 replies] Last: Whiteboards are awesome, but paper will work well too. In fact I use p... (by SexyBachelor)
Inheritance problem
 
I think the best way to understand the problem is to look at an example of the behaviour I would like to achieve (see below). Essentially, I would like to repl...
[1 reply] : OK. Looks like I found a solution myself. I have to use pointers to de... (by p0wertripper)
reversing string
 
Why doesn't this cause infinite loop b/c if I had an array of let's say 2 elems, and I set the wrong base case as such, wouldn't front be an index that goes pas...
[2 replies] Last: I forgot that the base case is reached the first time, and array is no... (by closed account 4ET0pfjN)
Array problem
 
Hello, currently working on an rental system for fun, when input the data and try to recall it using arrays it seems not to be working ill post the code below ...
[no replies]
Visitor Counter using PIC Microcontroller
 
im doing a project that use PIC microcontroller 18F452 to count visitor using C programming. the project consist of two sensor (sensor1 and sensor2). when the p...
[2 replies] Last: i have already figure it out to solve this problem. but then i got new... (by farahinesa)
PARI/GP with C++
 
I have installed Pari/GP software. It is capable of performing calculations such as 500! in a second. I want to use this library in C++ for example like #i...
[1 reply] : Try #include <pari/pari.h> ? (by soranz)
Using the "system" fxn & Operations on its output
 
I am trying to use the system function to create a string that is my present working directory. After getting the directory string, I would like to take off ...
[4 replies] Last: Another good point! This is a finalized version, which I made into a f... (by Justin Sharp)
by geeoph
Read in n number of bytes from a file...
 
For every 188 bytes of data in a text file I need to pass the data to an encryption library for encryption (I know how to do the encryption bit). I don't know ...
[no replies]
Having an unknown issue with a certain C++ code
 
It appears that the coding what im about to paste undearneath my message is wrong. Could someone please take a small peek at it? Because im pulling my hair out ...
[6 replies] Last: could you please past the header file .. ? (by bluecoder)
June 2012 Pages: 1... 2223242526... 33
  Archived months: [may2012] [jul2012]

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