General C++ Programming - April 2011 (Page 13)

Checking if value is float or int
 
I want to create a program that will find the factors of a given number. I have thought up of this concept: The User will enter a value (say x ). The progra...
[2 replies] Last: Sorry, It somehow got redundant. The other one (the one that was solve... (by Nisheeth)
Getting network traffic statistics
 
I'll start with this is a school project. That said, I need to write a program that can retrieve "randomness from the Internet". I need to pull a random numbe...
[no replies]
Emergency Please Help
 
I have been asked by my computer teacher to prepare the source code for a magic square in C++. I tried writing the program; din't get any errors compiling too.....
[3 replies] Last: yep, I can see what's meant to happen, just suggesting that you can te... (by Moooce)
DLP-IO8-G
 
Can anyone help me with one of these: DLP-IO8-G 8-Channel Data Acquisition Board from http://www.dlpdesign.com/usb/io8.shtml? The www page and their documents s...
[no replies]
by Jlibax
problem hash_map pointers
 
Hello everybody, I come here because I cannot find a solution to my problem after very long time of thinking and searching for solutions on the web. I nee...
[no replies]
by mof
Cross Platform Programming
 
Any advice on how to write a program for both Linux and Windows? Using Cairo as the drawing method, but what would be the best way to produce the GUI? Also, wh...
[13 replies] Last: To Moschops "Wine Is Not an Emulator", but I understand what you mean... (by closed account z05DSL3A)
by muswei
Copying Data Effeciently
 
I have an existing class underneath a http server that reads data from a stream into a std::auto_ptr<unsigned char> in chunks to get the total size of the dat...
[1 reply] : Well, I have doubts if copying the data multiple times in RAM can be a... (by Abramus)
Bad Pointer Doubly Link List
 
In the tutoiral im using it has ask for me to create a doubly link list however I am geetting a bad pointer runtime error. #include <string> #include <io...
[1 reply] : The problem is you are allocating LinkT object using malloc. This is w... (by Abramus)
It won't move. How is the loop wrong?
 
Hello My setup, in theory, is to setup two arrays and within a infinite while loop pull a value randomly from each array and print the coordinates they mak...
[3 replies] Last: You'll need to store the values you already got and check if the new c... (by Bazzy)
Simple string issue
 
So the assignment is to take a string the user inputs and reverse each word within the string (not to reverse the string itself, just each word individually). ...
[no replies]
help: want decode
 
hello there is only encode , can any one make the versa Decode: #include <iostream> #include <string> #include <fstream> #include <cstring> using nam...
[5 replies] Last: ok maybe i have it now, when es SO what u have mean..... now have this... (by rami2011)
no match for 'operator[]' in 'temp[0]'
 
** NEW CODE SINCE LAST ANSWER **(changed all multidimensional array to single) ANY other suggestions or help is appreciated! Hai, I got this error going in...
[3 replies] Last: I don't even see an internal array in there anywhere... Anyway, assum... (by Zhuge)
using && operator more than once in a statement
 
I wanted to give output to the user (from the Age Calculator) such that there is no value of 0. That is: The program will give the output of user's age in YEA...
[3 replies] Last: @Zeillinger: So should I have used || operator? @Bazzy: Thank a lot. ... (by Nisheeth)
C/C++ interview question(Math)
 
I am sharing one of my interview Questions. if you are given a function say f(x) = aXn + bXn-1 +...+z where Xn,Xn-1...are polynomials. You dont need to worry ...
[4 replies] Last: the thing is we dont have the exact f(x) function and we dont need to ... (by jackel7777)
checkbook program involving streams and files
 
This program is an assignment, and like all assignments it was due yesterday. I can write the code when I can modify the switch, however, my instructor is aski...
[no replies]
by Gldnbr
Diagram of this pointer situation?
 
int firstvalue = 5, int secondvalue = 15; int * p1, * p2; p1 = &firstvalue; // p1 = address of firstvalue p2 = &secondvalue; // p2 = address of se...
[1 reply] : Does this help? http://mathhead200.com/cpp/ram_demo.png (by Mathhead200)
function prototype with named argument(s)
 
If I write a function prototype, i.e.: int foo(int); the function returns an integer and accepts an integer, which is clear. now, my question: is it 'OK...
[4 replies] Last: It's not "bad practice". However just don't change what they really me... (by Mathhead200)
help with function template: range function
 
The question is: Write a function template that returns the range of values stored in a vector, that is, the difference between the largest value and the smalle...
[9 replies] Last: Although you have a working solution, you might want to generalize it... (by diedrexler)
Help with dynamic structure arrays
 
I have made a program using structures, like this typedef struct tagDATA{ char Route; char Name; char Description; char Image; GLuint ImageData; }DATA; a...
[8 replies] Last: After searching a lot through my code, i found that probably the probl... (by inuyasha016)
by Faurax
Question about making a save file unreadable for players
 
Hi, I am building a text-based console game with Dev c++ v. 4.9.9.2. So far, everything goes well. It saves the game in several save files for each character (m...
[3 replies] Last: It all works fine now, thank you all for the answers! (by Faurax)
April 2011 Pages: 1... 1112131415... 37
  Archived months: [mar2011] [may2011]

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