General C++ Programming - December 2012 (Page 22)

VC++ call external application
 
Hi, I am using Visual C++ 2010. I need to call an external application (.exe) in my code. I tried to add the path of the application in my code, or add the p...
[1 reply] : #include <windows.h> Then use CreateProcess() http://msdn.microso... (by Stewbond)
AvL Tree Deletion ISSUE
 
As you know how avl should be balanced after deletion of a node, I'll get to point. For starting, Im considering deleteing a node with no children. For Examp...
[no replies]
who can solve it?
 
write a program to print out the value of ln(x) and log(x) for any three diffrent values of X
[2 replies] Last: #include <iostream> using namespace std; int main() { double x; c... (by Stewbond)
8-bit-like sound in C++ with multithreading
 
Hello everybody, I want to create a program that can make 8-bit sounds. I want to use the Beep function. Because two Beep functions can't play simultaneo...
[no replies]
Can someone help me make this program?
 
You have a pumpkin patch in FarmVille and are looking for the biggest pumpkin. You must create a program (with a two-dimensional array) that allows each user to...
[no replies]
by TeddyX
Problem with seating array function
 
Hello. I am new to this forum, but have viewed many posts in the past regarding code. My scenario is the typical 'flight seat reservation' but I am stuck when i...
[no replies]
why is this program not working for all n??
 
Why is this c++ program not working? include <iostream> #include <stdlib.h> using namespace std; int main() {int n,i=1,k=1,j=0; cin>>n; while(i<=n){ if(n%i==0){...
[2 replies] Last: thank you very much! (by mohamadh95)
How to make a series like this?
 
5 7 9 9 11 13 11 13 15 17 13 15 17 19 21
[1 reply] : using namespace std; int main() {int n,i=1,k,j=0; cin>>n; k=n; whil... (by mohamadh95)
Can someone please explain this code.
 
So heres the code. It first creates and array of items typedef unsingned long Item ; int main(){ Item items ; return 0; } Now lets say th...
[1 reply] : This piece of code doesn't really make sense to me. What the pop func... (by Machtl)
SDL Mob Class
 
How would I make Mobs from this code? I know I can use vectors but how would that make every single Mob react to colision, death, etc? I know I can code functio...
[9 replies] Last: Thanks, I'll test out the concept later when I get home from school. (by closed account N36fSL3A)
by capet
A function to accumulate total correct
 
I might have confused myself trying to figure out to bring this program together. I made quite a few functions for code I thought necessary. Now, I'm trying to...
[no replies]
reading from a file using a function
 
Hello everyone! I have a school project Im having issues with, well just one part rather. Here is my code im trying to implement as a function that reads a com...
[2 replies] Last: info is not an array, so you should stop treating it like it is one. ... (by cire)
by Ayoob
how to put hex value in md5 hash instead of decimal value?
 
hi all: how to put hex value in md5 hash instead of string value?
[11 replies] Last: thank you for your help (by Ayoob)
Logical help needed for if condition
 
I have 3 varibles holding values Day Of Week(enum of week), Hour(0 to 23) and Minute(0 to 23), These 3 variables can hold only one comman value N/A and other v...
[1 reply] : sorry i'm lost, put some code in front of me to figure out what your s... (by SamuelAdams)
writting to C:\
 
I have a problem with missing rights. I just can't create files on C:\. Folders somehow are no problem, but files don't work. I already tried to run the .exe a...
[10 replies] Last: you didn't give us enough info to know if it is or not. (by SamuelAdams)
Sum of row of 2D array
 
To find the sum of row of a 2D array ( 4 X 4 matrix)i've inserted the formula in function count and the values are sent to function printout via reference varia...
[2 replies] Last: Every time your outer loop begins another pass, you reset rowTotal t... (by MikeyBoy)
Converting Decimal number into binary array
 
I'm working on a Genetic Algorithmic program and now I'm trying to convert decimal number into binary array. I've written this code to do that: float D...
[5 replies] Last: But there is a limit, so you could simply ignore the `0' bits at the ... (by ne555)
reference polymorphism
 
#include<iostream> using namespace std; class Base{ public: int i=0; Base(int i) {this->i=i;} virtual ~Base() {} virtual void print(){ cout<<"Bas...
[3 replies] Last: Yes that's right. It will only copy the Base::i in this case. (by Peter87)
Outputting data from txt file using getline!
 
Hi, I have a txt file with 12 rows and 7 columns. I am asking the user to input a value between 1 and 12, each value inputted corresponds to a row. i have ma...
[no replies]
by aj3423
overwrite some bytes using ofstream
 
Hi, I want to overwrite some bytes of a file, for example ofstream ofs("aa.txt", ios::binary); ofs.write("abc", 3); ofs.close(); I just nee...
[1 reply] : Have a look at the flags. I expect you'll need to use an append flag.... (by kbw)
December 2012 Pages: 1... 2021222324... 43
  Archived months: [nov2012] [jan2013]

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