49,761 Topics

Member Avatar for
Member Avatar for squinx22

how could I link the implementation file to the header file and to the main function. I made this program; // This is my implementation file.. (imp.cpp) #include <iostream> using namespace std; #include "CRectangle.hpp" output() { cout<< "hello"; return 0; } // This is my header file.. #include <iostream> using …

Member Avatar for John A
0
166
Member Avatar for RisTar

Hi , im trying to create a simple code that generate random numbers Im having two problem , 1. For some reason randomize() function does not work on VisualC++6 2. I didnt really got the idea on how to set the range of the numbers that will be generated using …

Member Avatar for WaltP
0
218
Member Avatar for Mpiangu

It appears every one is Usung Standard C++, Am using Borland and in my college we are stil stading borland can any one brief me about standard an may be is there need for me to switch to standard

Member Avatar for jwenting
0
117
Member Avatar for B.Y

I have a s1.txt like this : 3,R,G,T 1,E 9,T,U,Y,O Now I want to read each character of a each line ...do some analysis and then read each character of the next line ...do some analysis ...so on till EOF. How do I go abt this? Well ...I jus wrote …

Member Avatar for WaltP
0
9K
Member Avatar for squinx22

below is my program.. this concerns about IP addresses. this program works, but I have to separate the implementations in a class in the header file aside from main function.. the implementation/ the codes in the header file must be separated in one file and be conected to the header …

Member Avatar for iamthwee
0
79
Member Avatar for FreeFull

I tried to write a program that uses if loops to check if a char variable had certain value: [code=c++] /* FreeFull Software */ #include <iostream> using namespace std; float dark_rays; float light_rays; float ball; float universe; float matter; char menu; char darkmenu; char lightmenu; int main() { cout << …

Member Avatar for vijayan121
0
154
Member Avatar for chikwava

[b][/b][u][/u]my Question Is: Design And Implement A Programme That Helps To Analyse The Flow Of Patients Into The Emergency Room. Enter The Integers That Represents The Number Of Patients That Entered The Emergency Room During Each Hour Of The Day For Four Weeks In A Three-dimensional Array Then Analyze The …

Member Avatar for naya22
0
94
Member Avatar for Gaurav arora

hi all! i m trying to input an array of strings same as we input array of integers. by declaring a 2 dimensianal array runnig 2 for loops like [code] for(i=0;i<m;i++) for(j=0;j<n;j++) cin>>arr[i,j] [/code] plz help me i m in great confusion because by doing in this way, i m …

Member Avatar for sirkraven
0
106
Member Avatar for CRD

Find out Which header or DLL files are needed for functions in C++? In other words how do you know which include headers are needed to do ferious user defined functions? Dick

Member Avatar for Mpiangu
0
100
Member Avatar for nottoshabi

I wrote this code, and I'm having a little problem with it. The point of the code is for the user to enter a desired number, then that number gets subtracted by 45 then dived by the percentages and all that dived by 2. Also I dont know how to …

Member Avatar for Ancient Dragon
0
293
Member Avatar for NewKidWalking

Hello, I'm new... And this is my first code display. [code] [code=Language] #include <iostream.h> #include <iomanip.h> #include <ctype.h> #include <stdio.h> main() { struct figure_info { int a = 1; int who = 2; int where = 3; int when = 4; int how = 5; int why = 7; return; …

Member Avatar for ~s.o.s~
0
88
Member Avatar for Osama Mehtab

I've so far studied C++ through Robert Lafore's Book but to understand more variations of recursion I need some example codes for recursions hoping good from u :mrgreen:

Member Avatar for Ancient Dragon
0
95
Member Avatar for Duki

Hey everyone, I'm working on this program for class but I'm getting an error in the [I]sumGrades[/I] function saying 'inp' is undeclared. Could someone give me a hand? #include <iostream> #include <iomanip> #include <fstream> #include <string> using namespace std; // initializes count of females, count of males, female GPA sum, …

Member Avatar for John A
0
101
Member Avatar for Duki

Hey, I'm working on another program for class which is to determine the day of the year given the date the user inputs. The date will be input in the xx-xx-xxxx format. Is there a way I can cin Mon, skip char, cin Day, skip char, cin Year ? How …

Member Avatar for John A
0
241
Member Avatar for sirkraven

[COLOR=#555555]Hey, [/COLOR] [COLOR=#555555]I have a singly linked list that has a show all function that looks like this[/COLOR] [code] [COLOR=#555555]virtual void Show()[/COLOR] [COLOR=#555555] {[/COLOR] [COLOR=#555555] myObject->Show(); myNext->Show();[/COLOR] [COLOR=#555555] } [/COLOR] [/code] [COLOR=#555555]Where myObject is a class ordered by an int. This function prints out all information in the list.[/COLOR] [COLOR=#555555]I …

Member Avatar for sirkraven
0
126
Member Avatar for maverick786

I have created a project with about 7 files including 3 header files and 3 implementation files. I am getting a multiple definition error when compiling for one specific file of class. I have checked that if there is more than one allocation of storage for identifiers, this error arises. …

Member Avatar for thekashyap
0
60
Member Avatar for naya22

Hi. I am trying to write a program that asks for the wholesale cost of an item and its markup percentage, and displays the retail price. Well, I did that the regular way, but... My instructions require for me to: *Create a function that accepts the wholesale cost and markup …

Member Avatar for thekashyap
0
101
Member Avatar for jasssvj

Hi! How can I read all files in a directory, when I don't know which files are there? Sincerely Jasmina Jeleva!

Member Avatar for vijayan121
0
1K
Member Avatar for tygerberg

Hi I need help finding a gui library for c/c++, I'm tired of using DOS. I also want to get started in network programming. I want to create a server-client program that will enable me to send text over a network or from a mobile phone to a pc. If …

Member Avatar for Ancient Dragon
0
110
Member Avatar for sirkraven

[COLOR=#555555]Hi, I’m new to c++ and am looking for some help. I’ve searched through most of the site but cant find exactly what I need, so thought I’d ask. [/COLOR] [COLOR=#555555]I need to read in strings (arrays of char) from a text file in a function then pass them back …

Member Avatar for Ancient Dragon
0
104
Member Avatar for Riazansar

dear people i have an assignment due in one hour and its not working. i have to write a program with four functions that finds out and print the twin prime numbers. i followed every step in the assignment and its not giving any error but i dont have any …

Member Avatar for Riazansar
0
146
Member Avatar for Tauren

[code=c]cout << "\nYou trade your sword for a battle axe."; inventory[0] = "battle axe"; cout << "\nYour items:\n"; for (int i = 0; i < numItems; ++i) cout << inventory[i] << endl; [/code] Uhh well the question is that I really dont get the ++i Why would you use the …

Member Avatar for WaltP
0
127
Member Avatar for Manzar

Write a C/C++ program which consists of a user-define function Prime. This function will take a number and check that the number is prime or not if the number is prime Display The number is Prime other wise display The number is not Prime Call this function in main program.

Member Avatar for WaltP
0
100
Member Avatar for Brent.tc

How do i find the dimensions of a button? Example: I want to find the width of the start button, and the height and then assign them to seperate ints. int width=WindowWidth(Start); int height=WindowHeight(Start); The abbove functions are totally made up, so they are just examples...

Member Avatar for Ancient Dragon
0
98
Member Avatar for Senel

I want to write a program that enter the marks of n of student out of 100%, students who are (marks>=65) pass otherwise failed, want to print number of students who'r passed and failed ? I solved but wont work >< To enter nth marks of student need loop, then …

Member Avatar for Senel
0
104
Member Avatar for Brent.tc

I was wondering if it is possible (by this I mean, with a 'premade' c++ api function) to logon to a windows account (if there is I assume you must know the password) I use bloodshed, not vc++.

Member Avatar for vijayan121
0
243
Member Avatar for naya22

Well, everyone, here I am again. (I'm becoming a familiar face, am I???):confused: I am working on an program in Borland C++ Builder 6 in which I have to create a program that asks the user for their name, what package they choose, and how many hours did they use. …

Member Avatar for naya22
0
112
Member Avatar for addicted

me again, I need help with that so called templates in C++, i need someone who can break it down to bits for me, i just read it today and i understand few of it, i understand that templates are used for substituting function overloading... but i was thinking that …

Member Avatar for iamthwee
0
109
Member Avatar for CRD

Can any one spot why this listing Will not compile? [code=c] /*print_it.c-This program preints a listing with line numbers */ #include <stdlib.h> #include <stdio.h> void do_heading(char *filename); int line = 0, page = 0; int main( int argv, char *argc[] ) { char buffer[256]; FILE *fp; if( argv < 2 …

Member Avatar for CRD
0
434
Member Avatar for student86

In options 1 and 2, the user will input the ID, Type, Description, Quantity on Hand, and Unit Cost as one string with the values separated by commas. Use the function [B]strtok[/B] to parse the input into separate values. For the numeric values, call the function [B]verifyValue[/B] to verify that …

Member Avatar for student86
0
91

The End.