49,761 Topics

Member Avatar for
Member Avatar for networkmancer

Now im getting Declaration Syntax Error on line 155. Please help need urgent . [code] #include <stdio.h> #include <conio.h> #include<process.h> #include<dos.h> void graph(); void foo(){ int a,b; clrscr(); gotoxy(27,12);textcolor(12);cprintf(" "); gotoxy(40,14);textcolor(12);cprintf(" "); gotoxy(29,16);textcolor(12);cprintf(" "); for(a=1;a<=72;a++){ gotoxy(5+a,2);printf("Í"); gotoxy(5+a,23);printf("Í"); } for(b=1;b<=20;b++){ gotoxy(5,2+b);printf("º"); gotoxy(78,2+b);printf("º"); } for(int s=1; s<=3;s++){ gotoxy(41,2+s);printf("º"); } for(int o=1;o<=72;o++){ gotoxy(5+o,5);printf("Í"); …

Member Avatar for Ancient Dragon
0
238
Member Avatar for jBat

Hi, I'm just starting to practice with c++ and I'd like to know if there is a good way to handle the errors/exception. I write this program to check the modification time of a file. Thanks [CODE]int filewatcher::watch() { struct stat filestatus; stat(this->_filename, &filestatus); if((filestatus.st_mode & S_IFMT) == S_IFREG) { …

Member Avatar for Nick Evan
0
149
Member Avatar for touqra

Hi, I don't understand why I failed to insert vectors as an input of a function. I wrote : void fun( std::vector<double> do, int &count ){ ... } but it doesn't compile...

Member Avatar for Narue
0
117
Member Avatar for networkmancer

I need to put this one in my case 5 [code]#include<stdio.h> #include<conio.h> #include<process.h> float rate,day,gp,netpay,totald,sss,med,love;int age; float basic,cola,tax;char employee[20],addr[30],sex[10],bday[8]; void main(){ clrscr(); char choice; gotoxy(20,2);textcolor(4);cprintf("Payroll System"); gotoxy(20,4);textcolor(5);cprintf("Select Choices:"); gotoxy(18,6);textcolor(7);cprintf("[1] Add Customer Info"); gotoxy(18,7);textcolor(7);cprintf("[2] Compute Payroll"); gotoxy(18,8);textcolor(7);cprintf("[3] Display Information"); gotoxy(18,9);textcolor(7);cprintf("[4] Exit"); gotoxy(18,10);textcolor(7);cprintf("Enter Choice:"); scanf("%d",&choice); switch (choice){ case 1:printf("Employee Information\n\n"); printf("Enter Employee …

Member Avatar for Ancient Dragon
0
278
Member Avatar for basketball4567

Hi guys, I know that there might already be a tread about reading from file but this has a certain hurdle to jump... I have to read in a 1000 word document into something that will make a list of unique words and how many times they appear. Thats not …

Member Avatar for jencas
0
116
Member Avatar for rahul.agrawal

Hi All.. I want to generate a dialog bar or panel inside a window, for that i have seen a sample code somewhere (implemented on VC++ 6.0).. Now i am trying to use that code in visual studio 2008 but an assertion failed error is being occured..while i am using …

0
91
Member Avatar for Se7Olutionyg

[CODE]#include <iostream> using namespace std; class BigNum { private : int biggest; void determineBiggest ( int num) { if (num > biggest) biggest = num ; } public : BigNum () { biggest = 0 ; bool examineNum(int); int getBiggest() { return biggest; } }; bool BigNum::examineNum(int n) { bool …

Member Avatar for vmanes
0
143
Member Avatar for Der_sed

I know that an array matrix would have been better but Im taking a freshman course so coulnt use it. 1- Tic tac toe grid is defined from locations 1 to 9 2- For loop executes 9 times for 9 turns 3- A functions takes all 9 locations as argument …

Member Avatar for DdoubleD
0
142
Member Avatar for kyosuke0

Iv always had trouble with templates and I always get the same error message "Error: Templates can only declare classes or functions." program is a template linked list class and I'm using the sun studio 12 C++ compiler linkedList.h file: [CODE]#include "nodeType.h" using namespace std; template <class Storeable> class LinkedList …

Member Avatar for DdoubleD
0
263
Member Avatar for atch

Hi, I know that this topic was discussed previously but those previous threads didn't answer to my question which is: How to change color of this text: [code=c++] cout << "Some text" << endl; [/code] when I'm outside of main, i.e. in file with my class and in one of …

Member Avatar for atch
0
269
Member Avatar for rena0514

I have a program where i have to use partial array intialization to read data from a file and place it into an array...there is no example of this in my class book and i'm confused!

Member Avatar for DdoubleD
0
107
Member Avatar for Miganders
Member Avatar for Miganders
0
258
Member Avatar for KIEX

a program that parks in C++,takes the detail of passengers,driver,the car store in the link list class a pass,class acar,class aparkinglot

Member Avatar for Salem
0
112
Member Avatar for AbsoluteCPP

We have seen websites using Flash, very cool Menus, slides and much more. How to do this in C++. I am making a Contact Book. I want to create eye chating cool look GUI for it's front end. I have made a class named ContactManager this class get contact information …

Member Avatar for Ancient Dragon
1
154
Member Avatar for robtech

Anyone got any pointers on the interpretation of REG_BINARY data such as the ascii strings that are stored as binary values in HKEY_CURRENT_USER "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\RecentDocs\\folder"; I have long mastered most of the Win32 Registry functions but never really had the need to delve into the murky depths of binary. I guess …

Member Avatar for robtech
0
245
Member Avatar for prodigyaj

I am trying to find the sum of integers ( (int)(a*i)/b ) where i is from 0 to 10^10. The problem is a/b >=1 and can be a fraction also and a and b are constant If it wasnt a fraction then it was really easy i*(i+1)/2 * a/b Any …

Member Avatar for Sky Diploma
0
112
Member Avatar for bunnyboy

Can someone explain what am I doing wrong? I get "vector subscript out of range" error. Here is the sample ... [CODE=cplusplus] #include <vector> using std::vector; struct CUBE { int number; bool changed; }; int _tmain(int argc, _TCHAR* argv[]) { vector<CUBE *> cube; for (int i = 0; i < …

Member Avatar for bunnyboy
0
4K
Member Avatar for himgar

I had written a program [code] #include <fstream.h> void main() { fstream f; f.open("test.txt",ios::app|ios::in|ios::binary); cout<<f.tellg(); f.close(); } [/code] My file test.txt already contains text : " hello " i.e. 5 characters But when i try this it outputs only 0 but ios::app mode places the pointer at the end of …

Member Avatar for Salem
0
85
Member Avatar for Belthemet

[B]#Off topic[/B] When I was logging in, I have noticed 600,00x members registered on this forum. Congrats on the 600k! ;) Hello. My console game is going pretty well, even though I don’t have much spare time to expand it. I have some ideas I would like to add, but …

Member Avatar for Belthemet
0
259
Member Avatar for gretty

Hello I am making a function that takes in a date (dd/mm/yy) & returns what week number of the year the date occurs on. For eg; If I enter: 01/01/09 then the week number of that year will be 1 If I enter: 04/09/09 then the week number of that …

Member Avatar for gretty
0
2K
Member Avatar for prashantsehgal

hello this is prashant. well i need to find some helping materials online on WTL coz even microsoft site isnt having any sort of documentation in this.also can someone give me few examples in this as to how to create a dialog boxes & few other stuff.thanks in advance.

Member Avatar for Ancient Dragon
0
71
Member Avatar for Epi23

Hey everyone, I'm just now learning c++ and was wondering if there was a way to loop this program so that I don't have to copy and paste it. I got it to work, but I was just curious if there was another way to do it. it just does …

Member Avatar for Epi23
0
102
Member Avatar for gopi17

ok...i'm having trouble changing a value in a array into a character [CODE] void gameon(int **game,int &size,int &x,int &y,int &score1,int &score2) { int i,j,num1,num2; cout<<"Please enter a number from the selected row/column -->"; cin>>num1; for(j=0;j<size;j++) { if(num1==game[x][j]) { cout<<"Number found"<<endl; game[x][j]=='X'; score1=score1+num1; y=j; } } display(game,size,score1,score2); } [/CODE] i can't …

Member Avatar for vmanes
0
115
Member Avatar for iammfa

Hi, i'm using c++ with SDL, SDL image libraries, i trying build a small example, i got this error in linking when i build every project: ------ Build started: Project: 00000, Configuration: Debug Win32 ------ Linking... MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup C:\Users\iammfa\Documents\Visual Studio …

Member Avatar for John A
0
160
Member Avatar for ObanaJunichiro

[code]void inputGrid(string inputI, unsigned __int64 &i,int t) { do { t=1; getline(cin,inputI); i=atol(inputI.c_str()); if(i<=1) { cout<<"Please key in only the number that suitable for the grid."<<endl; t=0; } } while(!t); } [/code] //this is the function i used to solve the problem when i key in char //to an integer...but …

Member Avatar for VernonDozier
0
88
Member Avatar for Shreeravi

I have a situation where I have to scan some FTP Servers every 5 seconds to check for some specific files and download them if they exist. I use a Shell script to do FTP download operation and call it using C++ system call in a separate thread. (I am …

0
92
Member Avatar for thierryjohn

hey guys can u pls help in developing this program...im really very beginner in this...can u pls teach me how to start.. thank you so much...god bless You are required to develop a system to record details of student. This system should be implemented using structure and array. You are …

Member Avatar for Nathan Campos
0
267
Member Avatar for ihatestarch

What would a recursive function (not from a class) that puts some kind of element (like an integer) into a 2D array look like? I noticed a 2D array seems to be a bit different from a regular array in a function. Is the first bracket always empty and the …

Member Avatar for ihatestarch
0
2K
Member Avatar for rom87

How would someone go about creating a new cmd window and position it where ever from a win 32 program whenever .Also be able to get a handle to it to output text to the cmd window aswell.What call is required ? Thanks

Member Avatar for Frederick2
0
196
Member Avatar for deostroll

Well, for all those who do not know me: my name is arun. But this name is all too common in this world. So well for online purposes I have another name - deostroll. How I got that name? It wasn't assingned to me by someone; rather I had come …

0
61

The End.