48,986 Topics
| |
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 … | |
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 … | |
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 … | |
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 … | |
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). | |
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, … | |
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 … | |
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 … | |
| |
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 … | |
/*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 … | |
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] … | |
Hi Folks, I am new to Daniweb and new to C++. I will appreciate any help I can get. | |
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 … | |
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 . | |
[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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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> … | |
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 … | |
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: … | |
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 … | |
[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] | |
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 … | |
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 | |
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 … |
The End.