General C++ Programming - April 2010 (Page 5)

by Keaser
Draw circle in 2D array
 
Hi, as the the title states I want to draw a circle using a 2D array. I'm trying to use the Pythagorean Theorem to find all the points on the circle, but when ...
[2 replies] Last: Visual Studio gives me an error saying it cannot parse the function wh... (by Keaser)
"Freeze up" the program for awhile
 
Ok, so here's sort of what I'm trying to accomplish. I'll try to make it as understandable as I know how. int main() { int num; Start: cout << "\nEn...
[4 replies] Last: yea.. stupid me. "cin", not "stdin". Ciao, Imi (by imi)
How to generate compiler error on incorrect parent class?
 
Hi All, I am trying to implement a reference counting scheme for memory management in this application I am writing. I have two classes: CRefCounted and CRef...
[5 replies] Last: Thanks for the replies everyone. I think I'll try the boost 'is_base_o... (by sonelliot)
Segmentation fault while iterating std::map through callback
 
void call(boost::function<void ()> f) { f(); } void end() { cout << "End..." << endl; } void fn(map<string, string> &m, map<string, string>::iterator i...
[3 replies] Last: Thanks so much for the reply, it solved the problem. (by wangkhem)
A comma in an if or while
 
That title is odd i know but I just couldn't think of a short and easy way to sum it up. Basically, I remember reading on one of the forum threads that if you h...
[9 replies] Last: Removing that operator would break this for (/*...*/;a++,b--) //... ... (by helios)
Copy outputed text to clipboard or .txt file
 
Hello, I am working on a script compiler for my school's morning announcements. so far I have the function nailed, but it is stuck in the command line and it...
[4 replies] Last: never mind I found the ofstream myfile command here: http://www.cpl... (by adam8797)
by kcbob
program skips inpuit string
 
the program executes fine the first time, then it displays the first cout, the else statement and the last cout. #include <iostream> #include <cstring> ...
[1 reply] : Please don't cross/double post. (by Zhuge)
In serious need of assistance with files
 
My program is supposed to take the balances of two entries in files, one saving and one checking, and transfer those funds as defined by the user... ...
[no replies]
segmentation fault...
 
I am sure it is a simple error but I can't seem to figure it out. I am doing a merge sort with linked list and I do the merge sort recursively. Can someone give...
[no replies]
File IO with objects stored in an STL List
 
As the title suggests, I'm looking to load/save my objects to and from a text file. class aircraft{ public: string name; int registratio...
[1 reply] : There isn't a "simple" solution. At a minimum, you need to be able to... (by jsmith)
How to search contents of a file?
 
Hi. I wrote this code and now I wanna do sth more. How can I do this: Program asks user to input his ID and When user entered his ID, If his ID is in the fil...
[4 replies] Last: You have to read the file into the program and create a database. The... (by kempofighter)
Find the size of char**
 
Hello. I have the following problem: I have a char** pointer and I need to make a copy of the data it points to without knowing its dimensions. For every cha...
[2 replies] Last: Well.. I tried to make an analogy with delete ... It doesn't need the ... (by Ratzian)
Converting to Base 10
 
Hello Everyone! I am working on bitwise operators and I am a little confused at the moment on how to convert an integer value like 22 for example, to base 10...
[1 reply] : The integer value 22 is already base 10. (by jsmith)
Multiprocessing V.S. Multithreading V.S. ??
 
Hi Everyone, I’m basically coding some function that I’d like to be called simultaneously by three different objects. I’m currently working on my quad...
[1 reply] : General purpose OS' won't let you run code on particular processors. ... (by kbw)
stl list containing objects
 
To cut a long story short, I'm using list <helicopter> heliList; //list for helicopters ^this stl list to store objects of the type given above. Can an...
[5 replies] Last: You could overload operator<< to print the helicopter details. I woul... (by kempofighter)
Need to convert arrays into vectors
 
This is the program I have so far and I need to change it from arrays into vectors // This program is a driver that tests a function comparing the // contents...
[1 reply] : Unfortunately, the { } initialization doesn't work with vectors. Ther... (by kempofighter)
Create array containing first 10 odd numbers
 
Create an array that contains the first 10 odd numbers. Calculate and print the sum of those numbers.
[3 replies] Last: Well you had better get started then. (by kempofighter)
File Output with color?
 
im wokring on a project that lists DVD's in a linked list to a Output File and I was wondering if they is a way to make every other one a different color so tha...
[6 replies] Last: thanks for the responses i just want to output to a standard .txt file... (by krazyeyez8)
Read a word document
 
Hi, I need to read a word documento with c++ code. Is it possible??? Thanks in advance
[1 reply] : Yes it is possible. You will of course need to know how Microsoft org... (by guestgulkan)
i got a problem with inheritance and polymorphism
 
i am making a program that stores the data for a car truck or van. please help with this problem. 13_14main.cpp #include <cstdlib> #include <iostream> ...
[7 replies] Last: ok look i messed up with the copying and pasting on the car.h but i fi... (by zonaarten)
April 2010 Pages: 1... 34567... 24
  Archived months: [mar2010] [may2010]

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