49,761 Topics

Member Avatar for
Member Avatar for leesho

i have an assignment due for my c++ class where we have to input from the keyboard the quantity and input from the keyboard the stock price. so that it outputs as: Stock Item Quantity Unit Price Total Value ---------------------------------------------- Television 5 368.00 1840.00 Video Recorder 8 268.00 2144.00 Camera …

Member Avatar for finito
0
167
Member Avatar for hamadaahly
Member Avatar for new2programming

can anyone tell me why the timer doesn't work in my code? The game runs good but there is no timer? [CODE]//---------------- includes ---------------- #include "global.h" #include "SDL.h" #include <string> #include <cstdlib> #include <windows.h> #include <mmsystem.h> #include <stdlib.h> #include <stdio.h> #include <time.h> #include <conio.h> #pragma comment(lib, "winmm.lib") using namespace std; …

Member Avatar for daviddoria
0
240
Member Avatar for vanalex

Hello everybody! I need to move the get pointer of a text file at the beginning so i wrote in my program the following line (knowing that in a binary file really works): [code=c]ifstream in; in.open("data.txt", ios::in); in.seekg(0, ios_base::beg); [/code] but...in my text file doesn't really work. Is there a …

Member Avatar for vanalex
0
222
Member Avatar for Theanonymous

Hi this is my problem Define a class Circle that stores the center and radius of a circle, by keeping the numbers in a dynamically allocated array of doubles. Supply the "big three" memory management functions. Use this class to demonstrate (a) the difference between initialization Circle s; Circle t …

Member Avatar for Theanonymous
0
110
Member Avatar for vinsbg

pls help me with this one..everything is ok but when i add student and faculty number and then try to list them says "No added students'...:@ This is: main.cpp [code] #include <iostream> #include "Student.h" #include "Course.h" using namespace std; list<CStudent*> students; list<CCourse*> courses; CCourse* findCourse(string name) { CCourse* course = …

Member Avatar for vinsbg
0
105
Member Avatar for Sandhya212

Hi, I need to make a pairs between array elements. For eg if the sored array I have is [CODE]1 1 1 2 1 4 1 6 2 3 2 5 2 8 2 9 3 7 3 10[/CODE] then I need to pair every element of the 2nd column …

Member Avatar for Sandhya212
0
243
Member Avatar for GamerXxX

I creating a 2d computer game, and I want to put enemies that in that appear at random coordinates. The problem is i'm not sure entirely how to do it. I have the "enemy" in a array of 30,and then i want to put these 30 enemies on a map, …

Member Avatar for GamerXxX
0
750
Member Avatar for bklearner

I believe that ofstream is for writing into a file and ifstream is for reading from a file. I am trying to write into a file by taking commandline input from the user which is the accept_data() function and and then display all the data from the file that the …

Member Avatar for NathanOliver
0
251
Member Avatar for avarionist

I'm trying to just use a normal stack and have it pop the numbers in the order stacks normally go but it just keeps popping 28 (or at least from output thats what i see) it should just be pretty straight forward but .... [CODE] #include <iostream> #include <stack> using …

Member Avatar for avarionist
0
109
Member Avatar for debugger09

hi guys!! i am wrting a program for a small arithemtic game,it displays two numbers and ask user to enter the sum of these two numbers,the program runs fine but i want to add a countdown timer,i mean time limit for user to answer all 10 questions within 30 seconds.i …

Member Avatar for debugger09
0
150
Member Avatar for vbx_wx

It is posible in a linked list implementation,the nod to hold more then one information ? for exemplei want the node to hold a person`s name,adress,country,etc....

Member Avatar for Narue
0
146
Member Avatar for Sandhya212

Hi, I would need to create unique filenames appended by the iteration number. For eg. [CODE]for( i=0;i<iterations;i++){ ofstream outfile("iterfile"+"i"); // i.e filename should be iterfile0 for 1st iteration. } [/CODE] I need to cast "i" from int to char so I tried [CODE]ofstream outfile("iterfile"+(char)i)[/CODE] but it did not work. How …

Member Avatar for Sandhya212
0
218
Member Avatar for ferenczi

Hello, I have a question: [CODE] Algorithm DFS(Vertex V) mark[V] := 1; print[V]; for each (edge (V, W)) do if mark[W] = 0; DFS(W); [/CODE] I would like to realize this recursive procedure (depth-first search), but in my graph representation (with adjacency lists) I use two different classes, one for …

Member Avatar for thelamb
0
124
Member Avatar for ms_farenheit1

I am in the process of updating and modifying source code for an existing application that runs on Linux systems. As part of my modifications, I will be needing to use the library function unlink() from unistd.h However, the class that I need to modify, has an existing public member …

Member Avatar for ms_farenheit1
0
163
Member Avatar for Yondaiyme

Hello! I need to check packet sender from some port and separate packet if the sender is not trusted how get info about packet sender.... ? please help...

0
25
Member Avatar for RossSCann

I have downloaded the trial package and am trying to update an old project developed on VC++ 2002. The old environment will not develop an executable to run on W7. The VC++ 2010 generated an upgrade, compiled, linked and lists just a single error MSB3061 which is labeled "unable to …

Member Avatar for RossSCann
0
98
Member Avatar for Theanonymous

hi i need a urgent help for a program that i cant make and this is : Write a program that implements a game, to teach arithmetic to little children. The program tests addition and subtraction. In level 1 it tests only addition of numbers less than 10 whose sum …

Member Avatar for Theanonymous
0
112
Member Avatar for Yondaiyme

Hello !! i need to write some program on the windows that block incoming connection from any Ip from some ports (for example 21 or 25) and allow to connect Ip that are in white list ! and always when coming new connection from ports, the program must check the …

0
24
Member Avatar for codedhands

Hello Good people,am not so sure if this should go here,i am student who is interested in developing a search engine that indexes pages from my country.I have been doing my research on Algorithm to use for sometime now and i have found HITS and PageRank as the best out …

Member Avatar for binoykp
0
1K
Member Avatar for MorrisL

I am trying to convert a piece of code into Delphi but fall down when it comes to this example : [CODE] void __stdcall GetBuffers( short **xBuffers, unsigned long nValues) { ....... memcpy(TargetA, xBuffers[0], nValues * sizeof(short)); memcpy(TargetB, xBuffers[1], nValues * sizeof(short)); memcpy(TargetC, xBuffers[3], nValues * sizeof(short)); memcpy(Targetd, xBuffers[4], nValues …

Member Avatar for BitFarmer
0
465
Member Avatar for anuragcoder

Hi guys, Here's my project finally. It's name is C.L.O.S.E - The Command Line Open Source Editor Please review and comment. Mention errors if any, Also, for this code to work. Please download open.cpp, find.cpp, new.cpp, append.cpp, compile them and place all of them including the main source in a …

Member Avatar for anuragcoder
0
323
Member Avatar for new2programming

I am trying to use the playsound function i have the code [CODE] PlaySound(L"C:\Documents and Settings\Louisa\My Documents\Visual Studio 2010\Projects\Ninja_Wars\Ninja_Wars\music.wav",NULL,SND_FILENAME|SND_ASYNC | SND_LOOP); Sint32 delta;[/CODE] But when i play the game all i hear is a beeping sound- the one windows has when there is an error or something. Can anyone help …

Member Avatar for nbaztec
0
104
Member Avatar for alexbadboys

Hi, I've to send a string using serial communication. I've tried to use WriteFile function but maybe I wrong something, because I cannot send my data. I hope someone can help me! Tnx everybody Bye Alex

Member Avatar for Alexandra_Os
0
3K
Member Avatar for epicasian

Okay, like my other thread says, I'm working on a game engine. A couple if minutes ago, I compiled, and it ran perfectly. Now, when I compile it, I don't even see a DOS prompt or anything. I'm really confused, can someone help me and tell me what I did …

Member Avatar for epicasian
0
138
Member Avatar for vadalaz

Hey guys, I've recently started learning WinAPI and I want to make a Tic Tac Toe game with it but I have a problem I have a main window ("field") and 9 child windows ("tiles") and I want to make the tiles clickable so that a click calls the Beep() …

Member Avatar for thelamb
0
282
Member Avatar for challeng

can any one suggest me solution please [CODE]//CAtlString str=(_T(buffer)); //buffer wil have{{ ( ab != cd } == true }} as my input CString str=(_T(buffer)); CString symb[10]={ "{{","}}","==","<=",">=","!=" , "true", "flase", '(', ')' }; (LPCTSTR)str.trim(_T(symb));[/CODE] if i am trying to execute this code iam getting some errors like 1>d:\c++_test_code\simple\simple\simpledlg.cpp(197) : …

Member Avatar for challeng
0
306
Member Avatar for epicasian

Hello Daniweb, I am writing a game engine in C++ with SDL, and am faced with a problem. I need to store the sprite animation coordinates for every different animation in a different array. The problem I am facing is, since I am putting the arrays in one single Player …

Member Avatar for mrnutty
0
134
Member Avatar for mrnutty

Its this side thing I was working one, when I got the chance. Its not very good right now, as its still in its developing stage. But its still ok, where I can show it of, lol. Attached is an exe, that given a set of data points, it tries …

Member Avatar for NathanOliver
2
164
Member Avatar for Mz3g

Hi folks, Can someone tell me what is the meaning of this line? and how to use this command properly? [CODE] Lock::~Lock() { DEBUG('t', "Deleting lock \"%s\"\n", name); [/CODE] Thanks

Member Avatar for NathanOliver
0
76

The End.