48,986 Topics

Member Avatar for
Member Avatar for Kus

Hi, im pretty new to c++ and i have created the program below, and for some reason it sets 1 or 2 arrays right then the rest just 0's, when it uses the same code, and the data is getting threw to the calls etc... i have no idea why …

Member Avatar for Kus
0
235
Member Avatar for letmec

hello guys, I am making a browser for Dos (working in graphics mode) in c++. the problem is that i don't now how to get all the directories, file names in current drive (so that i can display their different icons). Kindly give me an example to get all the …

Member Avatar for Dave Sinkula
0
87
Member Avatar for davejigsaw

I am having trouble undestanding this code, can someone please help. I dont understand what the for loops do also. [code] void Merge( long array[], long left, long middle, long right ) { long i, j; long temp[MAX_ARRAY_SIZE]; for( i = middle + 1; i > left; i-- ) temp[i …

Member Avatar for Ghost
0
128
Member Avatar for missdiva
Member Avatar for Prahaai

Related to my game again, i want to choose my options by typing the command. Yet, i am in a big difficulty, because switch() only accepts numbers, or it accepts one letter. Everyone knows how switch works, i dont think i need to give an example. Anyway, i will post …

Member Avatar for Dogtree
0
169
Member Avatar for sinB

Hi! I use Turbo c++ 3.0, and i have been trying to write to video memory directly (0xB8 :eek: :eek: ). It works Okay in asm, how do i do it in c? (and i can't use inline asm for some stupid reason).

Member Avatar for Dave Sinkula
0
67
Member Avatar for usausa

I am trying to search for files in Directories. like, i have 10 directories..... and consider directory 1, which has 2 files.. this is same with all the files... i want to get a string from each of these files from 10 directories... to be written to a seperate file, …

Member Avatar for vegaseat
0
457
Member Avatar for Prahaai

I have this game skeleton. Now, as you can see, it is working, but when i choose something first time, i have to type it TWICE to make it work. It doesn't matter if i choose Status, Score, or Battle, or Flee, the result is the same: i have to …

Member Avatar for Prahaai
0
172
Member Avatar for riturajraina

Hi Friends, Can anyone tell how to change the attributes of a directory through C or C++. I have tried to found in my compiler's help file but it was showing the method to change the file attributes but not the directory's. I want to change the attributes of a …

Member Avatar for boggsi
0
429
Member Avatar for t3bruce

Can anyone suggest books that can help a first time C++ student. ;)

Member Avatar for t3bruce
0
157
Member Avatar for silkfire

I'm developing a small database application that can add records to a file, but also modify them in a few ways. It keeps the records in a temporary object of my class PersonInfo. The problem now is that it doesn't want to display things correctly, it seems to only be …

Member Avatar for silkfire
0
173
Member Avatar for Prahaai

/*I used and modified a piece of code i found in here and my main(){} looks like this:*/ [code]int main() { HANDLE hConsole; char welcome_l1[100]; char welcome_l2[100]; char welcome_l3[100]; char welcome_l4[100]; unsigned short k=120; hConsole = GetStdHandle(STD_OUTPUT_HANDLE); ifstream file("ver"); file.getline(welcome_l1, 100); file.getline(welcome_l2, 100); file.getline(welcome_l3, 100); file.getline(welcome_l4, 100); SetConsoleTextAttribute(hConsole, k); cout<<welcome_l1 …

Member Avatar for Dave Sinkula
0
206
Member Avatar for Tetsu

I'm running into to this problem where the fstream is suppose to read data off a file to store in arrays. I cant continue with my project until the program reads it right. It is skipping some of the datas. Can I get a little help? Thanks in advance [CODE] …

Member Avatar for Tetsu
0
469
Member Avatar for kisseric

Hi Folks, I am new to Daniweb and new to C++. I will appreciate any help I can get.

Member Avatar for kc0arf
0
81
Member Avatar for MitchellH

Hi, I am just a beginner at windows programming, so I am wondering, how do I create a dialog-based application (similar to that of using VC++ and MFC) with just the pure windows API? Currently I am just doing the following, but I have a slight feeling in my gut …

Member Avatar for Dogtree
0
147
Member Avatar for cspikes

I am a new c++ student trying to write code....please help..... I have a telephone entry Name has at most 40 charachters Seven digit number I want to be able to tell the number, name and reset name for name changes and reset the # if a person moves .

Member Avatar for Dogtree
0
130
Member Avatar for t3bruce

[code]using dice std; # include <cstdlib> int dice( ) { int. random_ interger = rand ( ) cout << random_ interger << end 1 }[/code]<< moderator edit: added [url=http://www.daniweb.com/techtalkforums/misc.php?do=bbcode#code][co[u][/u]de][/co[u][/u]de][/url] tags >> . Write the member function definitions for each function listed: 1. Object Type: a pair of dice Knows: The …

Member Avatar for Dave Sinkula
0
178
Member Avatar for t3bruce

Cplusplus question I need assistance with defining structures: 1. Write the member function definitions... Object Type: a pair of dice Knows: The vaule of each face (1-6) Can Do: ROll for new face values Tell the value on each face. Initialize the die to have a value of 1 on …

Member Avatar for Dogtree
0
180
Member Avatar for hzuniga4

For some reason the code is not printing the error string in the output screen of the operating system. Go figure? This code is directly out of the book. [code]#include<iostream.h> #include<fstream.h> #include<stdio.h> #include<stdlib.h> #include<conio.h> ofstream fileout; ifstream filein; void main() { char file[20]; //you must type in filename and extension …

Member Avatar for Catweazle
0
123
Member Avatar for Funktar

omg i need help so bad. I've been working on a school project for what seems like an eternity and i'm close to deadline. Using FIFO's (i ahve to) to communicate between parent and child proc's. Right now I'm stuck on a read/write. fifomsg is a struct with int length …

Member Avatar for Dogtree
0
168
Member Avatar for silicon

Hi everyone, I am still having a few issues with my program. It definitely runs but it just seems to run poorly. I think my problem lies within the following 3 sections Quicksort, Partition, and Insertion I've written comments next to each line of code just to make sure that …

Member Avatar for Dogtree
0
126
Member Avatar for sinrtb

HAving trouble with my pointer arithmetic, any ideas appreciated My orgional code [code] Activity p[51]; for ( int i = 1; i <= n; ++i ) { // Read the activity records. pert >> p[i].i >> p[i].j >> p[i].pt >> p[i].prt >> p[i].ot; pert.getline(p[i].desc,21); [/code] converted but wrong [code] Activity …

Member Avatar for Dogtree
0
441
Member Avatar for JoBe

Good evening everyone, This next exercise, I have to do the following: Write a ClassTemplate for a linked list. Demonstrate it by using two linked lists. The datafield of the first type is int, the second one is double. What Ive got sofar is this: [code] #include <iostream> #include <vector> …

Member Avatar for Dogtree
0
210
Member Avatar for bpshivade

hi guys, i am new bie in VC++. i want a project for finger print matching using VC++. if anyone have the same. please mail it to me with source code. i will be very thankful to him/her. I am champ in Java technology, if anyone facing any problems regarding …

Member Avatar for Dogtree
-1
232
Member Avatar for M.Rodz

Hi. I have to write a program that will return the amount of all the vowels on a string.. I already did it, but it freezez during the execution :sad: . Any suggetions are welcome. ps.I must say that I am a begginer on this... :o Here is the code: …

Member Avatar for Dogtree
0
205
Member Avatar for tyczj

ok im stuck how do u print to the screen in the main file from a class? this is what im doin [CODE]ostream &operator <<(ostream &outs, const Point &p) { outs << "(" << p.getX() << ", " << p.getY() << ")"; // print out the value of the point …

Member Avatar for Dogtree
0
230
Member Avatar for M.Rodz

[COLOR=Blue][FONT=Arial Narrow]Hi. I am a begginer :cheesy: on the programming area and I am currently taking a course on C++. I have doubts :o about how to use the strchr function. Can somebody give me some hints? :?: Thanks.[/FONT][/COLOR]

Member Avatar for vegaseat
0
190
Member Avatar for Scuuba

Hi, sorry I'm posting so much all off a sudden, but I recently found these forums, and they've been a lot of help. I'm have to read into the program from a file and output into another file. The problem is in function calculateGrade. When I output, I get a …

Member Avatar for Scuuba
0
121
Member Avatar for madt

can someone help me with this, or just help get me started. write the definitions of the functions to overload the increment, decrement, arithmetic, and relational operators as a member of the class rectangeType. write a test program that tests various operations on the class rectangleType

Member Avatar for Dogtree
0
167
Member Avatar for nathanj99

Hi Im using C++ builder 6 and need to print off some text. The text will be in the form of strings. I guess I need to use TPrinter. Can someone point me in the right direction on how to print stuff out from C++. I need to be able …

Member Avatar for vegaseat
0
173

The End.