51,593 Topics

Member Avatar for
Member Avatar for technogeek_42

can anyone here who knows where can i find the posted one problem that is to convert the month-day-year birthday to a simple day like sunday?? and who knows the answer to this problem using getdate setdate??

Member Avatar for technogeek_42
0
442
Member Avatar for Rand al'Thor

I want to make some functions that I expect I will use again and again, but I don't want to copy and paste them everytime I make a program that will use them. My thought was to make a .h file with a namespace. Would that work? Or would I …

Member Avatar for Rand al'Thor
0
168
Member Avatar for protito

im using eclipse with CDT. my program works right now as a single source file. i want to split into various, so is easier to keep coding. i have problems with includes and stuff. what is the right way to do this? i didnt find any tutorial for this.. thanks …

Member Avatar for protito
0
37
Member Avatar for Jennifer84

I am trying to open a file with this code but wonder what extension this file has. My project is under this path: c:\\Documents and Stteings\\Jennifer\\My Documents\\Visual Studio 2008\\Projects\\Form1 Under this path I have a File that is named "Form1". If I doubleclick this file VC++ opens. The problem though …

Member Avatar for WolfPack
0
87
Member Avatar for nurulshidanoni

How to count how many (3, 10 appears in data? I have done a little bit programming but abnormal program. (3 , 10) (3 , 31) (3 , 51) (3 , 71) (3 , 78) (3 , 97) (3 , 105) (3 , 113) (3 , 135) (3 , 138) …

Member Avatar for nurulshidanoni
0
87
Member Avatar for Jennifer84

How is it possible in C++ .NET to open a file on the computer. Lets say that I am trying to open this file. Is this possible to do. In this case, Wordpad will open. Thanks [code] "C:\\WordPadFile.rtf" [/code]

Member Avatar for Jennifer84
0
92
Member Avatar for adnanius

Hi again; Today I've got some silly questions about the translation of an algorithm to c++ :S (hey matrimkar, I found something that should work!:idea: ) well, my questions are in comments in this code: You can just read the first 2 paragraphs of the code, the 3rd one is …

Member Avatar for adnanius
0
112
Member Avatar for ArrogantLegend

So I have writing to a file and reading from a file. Now I need to be able to find specific data that was previously entered and saved to that certain file. Here is the code I have so far. [CODE] { ofstream myFile ("words.txt"); if (myFile.is_open()) { myFile << …

Member Avatar for ArrogantLegend
0
78
Member Avatar for SEOT

I need to sort a list with a bunch of numbers in separate columns. How would you sort a linked list with a bunch of numbers in separate columns. Anyone have any good examples to share or point me in the right direction. Please help - SEOT

Member Avatar for dougy83
0
129
Member Avatar for Jennifer84

I have a program that consists of 2 Forms in C++.NET. When I open Form1 that is my "StartForm", this Form comes up in the TaskBar as all applications and Folders etc on the computer. So when I open Form2 from Form1. Both these Forms will appear in the TaskBar. …

Member Avatar for Jennifer84
0
114
Member Avatar for jeffige

Following along a tutorial I entered code for a person to enter the age of five students. Then, the program is supposed to divide the five ages and display the result. It allows me to enter the ages, but as soon as I hit enter after inputting the fifth age, …

Member Avatar for highspeedhook
0
175
Member Avatar for Jennifer84

I have a .txt file that contains a lot of text. I will read the whole text file and output a new textfile with one change that is this: The txt file that I will read could for example look like this: [I]Value1 Value2 Value3[] Value4 Value5[][/I] What I am …

Member Avatar for Jennifer84
0
99
Member Avatar for manu1001

I've an old C function that calls a function pointed by a global function pointer. How do I get it to call a member function of a class object determined at run-time. It'll be complied in a C++ project of course. My main motive is reusability here. So I don't …

Member Avatar for vijayan121
0
312
Member Avatar for dkwantee

[CODE] [LIST=1] [*]void selectionsort(int numbers[],int arraysize) [*]{ int i,indes,large,j; [*] for(i=arraysize-1;i>0;i--) [*] { large=numbers[0]; [*] index=0; [*] for(j=1;j<=1;j++) [*] { if(numbers[j]>large) [*] { large=numbers[j]; [*] index=j; [*] } [*] } [*] numbers[index]=numbers[i]; [*] numbers[i]=large; [*] } [*]} [/LIST] [/CODE] i have been able to understand upto 7 line. can someone …

Member Avatar for manzoor
0
114
Member Avatar for Jennifer84

If I have a file like this and I want to copy this "File1" to "File2", how is this possible to do. So I will copy File1 so the new file with have the name "File2.txt". I know that: std::copy member exists but are not really sure how to use …

Member Avatar for Jennifer84
0
73
Member Avatar for amitahlawat20

class matrix { int **p; int d1,d2; public: matrix(int x,int y); //constructor allocates block of specified size /*I am not specifying contructor code*/ void get_element(int i,int j,int value) { p[i][j]=value; } int put_element(int i,int j) { return p[i][j]; } // [U][B]return statement encountering access violation during runtime , Help!!![/B][/U] };

Member Avatar for mitrmkar
0
99
Member Avatar for ctor

hi, i would like to code a toypiano using SDL and c++.--a simple program which will emit a note when a graphical representation of a piano key is clicked. how do i call a particular midi note(corresponding to piano note)using SDL.(i am beginner with SDL and midi stuff,with adequate knowledge …

Member Avatar for ctor
0
87
Member Avatar for ckins

I'm so new to arrays, I've read, I've made boxes...and yet I'm still clueless. So my task is to make a bingo card, so far I've made one column of numbers that don't repeat...something I'm very proud of, but to do that same thing with different ranges for 4 more …

Member Avatar for VernonDozier
0
291
Member Avatar for MasterDucky

Hi there! I'd like to check if a string is preceeded by another one. More precisely in this example i would like to check if there is "lion" right before "sleeps". Im using rfind() to search backwards but for some reason it starts the search from the beginning of the …

Member Avatar for MasterDucky
0
140
Member Avatar for vesper967

I'm working on a project that is supposed to parse through a text file (about the length of a book or small dictionary) and print out the index. The program does not need to keep track of the frequency of the word. The data structure I'm using is a binary …

Member Avatar for vijayan121
0
153
Member Avatar for nickthedivil

Hey I know i am over looking somthing small but can i get some help on line 23 [code](strcmp(chartryname, charname)==0 && (chartrypassword, charpassword) ==0){ [/code] I know this will not work its just to show what i am trying to do. I need to check two pairs of strings how …

Member Avatar for amitahlawat20
0
115
Member Avatar for kemboy

[code=cplusplus] /////////interface //appication.h #ifndef APPLICATION_MAIN_H #define APPLICATION_MAIN_H #include<string> using std::string; class appliance { protected: string Manufacturer; string Type; public: appliance(string a,string b); ~appliance(); void setManufacturer(string a); string getManufacturer(); void setType(string b); string getType(); void showDetails(); }; #endif [/code] [code=cplusplus] ///////implementation//////////////////// //appication.cpp #include<iostream> using std::cout; using std::cin; using std::endl; #include<string> using …

Member Avatar for kemboy
0
92
Member Avatar for digitz101

I'm having problem w/ this codes in bright red, when i'm trying to enter a name the first two letters are always not shown or when inside the inner looping, it don't show what the inner looping is containing. [code] #include <iostream> #include <iomanip> [COLOR="red"]#include <cstdio> // used for reading …

Member Avatar for Ancient Dragon
0
89
Member Avatar for curt1203

I have an assignment to do and i have a good portion of it already complete...The only thing i need is to validate that the number can only have one decimal point and the output of the number that has been validated is multiplied by two.....See the assignment question i …

Member Avatar for curt1203
0
115
Member Avatar for Joatmon

Hi, after searching this forum adequately (I think) I have decided to post this thread asking for an easy to understand resource that describes how to do multithreading on C++ in windows. The current ones I am finding out there on the web either 1. Simply don't work or 2. …

Member Avatar for Ancient Dragon
0
110
Member Avatar for jalo3030

I need help work wil not compile this is what I have to do. Write a program that calculates and prints the monthly paycheck for an employee. The net pay is calculated after taking the following deductions (define these as constant variables): Federal Income Tax: 15% State Tax: 3.5% Social …

Member Avatar for Ancient Dragon
0
120
Member Avatar for jalo3030

Whats am i doing wrong it is not compile Write a C++ program that creates customers’ bills for a carpet company when the following information is given: a.The length and the width of the carpet in feet. b.The carpet price per square foot. c.The percent of discount for each customer. …

Member Avatar for Ancient Dragon
0
286
Member Avatar for jalo3030

can some one start me off i'm lost Write a C++ program that calculates customers’ bills for building a desk. The main ( ) function shall call four functions (described below). Pass all variables so that the functions make copies of any variables they receive. The following four functions are …

Member Avatar for Ancient Dragon
0
93
Member Avatar for jalo3030

What am I doing wrong with this one. I'm a beginner Write a program that takes as input any change expressed in cents. It should then compute the number of half-dollars, quarters, dimes, nickels, and pennies to be returned, returning as many half-dollars as possible, then quarters, dimes, nickels, and …

Member Avatar for Ancient Dragon
0
430
Member Avatar for jesseb07

hey, been working on a program and I had a need for a password line (btw I am using linux w/ gcc compiler). while I was making it I checked the net and found there's no getch() for linux, so I frankensteined one from several sources and got it to …

Member Avatar for jesseb07
0
2K
Member Avatar for Queen of Dreams

[COLOR="Green"]Hi there[COLOR="Red"],[/COLOR] This is the first participation in this site[COLOR="red"], [/COLOR]& I want to help me would you mind answering this questions[COLOR="red"],[/COLOR] pleeeeeease[/COLOR]:icon_cry: ======== [COLOR="red"]((1)) Write a C++ program that do the following: a.Define a class called Calculator. b.Declare the object Cal of type Calculator. c.Define a member function Display_sum …

Member Avatar for mitrmkar
-1
226
Member Avatar for The Midnighter

Hey there folks. I am trying to write a program that will take in a paragraph file, and compare it against a "Dictionary" text file, which is being inserted into a Binary Search Tree. Here's what I've got so far: [code]#include <iostream> #include <string> #include <fstream> #include <iomanip> #include <cctype> …

Member Avatar for chaosatom333
0
105
Member Avatar for adnanius

hello I'm new to c++ and I'm writing a program for a college project. I'm getting an error I don't understand, if someone can help me with it I'll be thankful Oh, and by the way, the functions names are in French, hope this wont be a problem. Here is …

Member Avatar for adnanius
0
705
Member Avatar for amitahlawat20

/* unable to return value from following function due to if - else block within function..*/ mat operator + (mat &m1,mat &m2) //mat is a class for matrix object { int r1=m1.getrow(); //getrow returns number of rows in matrix int r2=m2.getrow(); int c1=m1.getcol(); //getcol returns number of columns in matrix …

Member Avatar for Joatmon
0
104
Member Avatar for farag

Hi I need urgent help doing this program (attached here) I must make it within hours, please help me Thanks

Member Avatar for farag
0
85
Member Avatar for jeffige

I have been following a C tutorial and using DevC++. When I write this code: [CODE]#include <iostream> using namespace std; int main () { cout << "Hello World!"; return 0; }[/CODE] and try to compile and run, I get this file popping up... [*] cstddef // Copyright (C) 1997, 1998, …

Member Avatar for jeffige
0
345
Member Avatar for jeffige

Is there any way to get rid of the "Press any key to continue" in the Dos window.:-/ I am using DevC++ ver. 4.9.8 It gets alittle annoying after awhile. And yes, I am new to programming.

Member Avatar for jeffige
0
206
Member Avatar for lifei

hi..i know this question sounds like stupid, but there is nobody that surrounding me i can ask. i had already found the other people program at [url]http://www.ucancode.net/Visual_C_MFC_Example/Create-2d-bar-line-pie-chart-vc-example.htm[/url] however, there are a few things that i am not sure about it. can someone help me to solve it? what is it …

Member Avatar for Ancient Dragon
0
171
Member Avatar for guitarrick

Hello out there!! I am trying to search a string for the proper format of a date and time...... My date will simply be: ##/##/#### and my time will simply be ##:##A.M. or P.M. I am thinking I can use something like : [CODE=C++] size_type find_first_of(CharType ch, size_type indx = …

Member Avatar for Joatmon
0
160
Member Avatar for DOrmisher

I'm using Borland Builder C++ 6 (my tutors force me to) and I want to make a TImage full screen. I don't think there's any specific function for this, the only way I can see doing it is possibly manipulating the Height and Width properties, but then again I can't …

Member Avatar for DOrmisher
0
157
Member Avatar for amitahlawat20

[code=c++] /* unable to return value from following function - adds two matrix class objects */ mat operator + (mat &m1,mat &m2) // mat is a class for matrices { int r1=m1.getrow(); // getrow returns number of rows int r2=m2.getrow(); int c1=m1.getcol(); //getcol returns number of cols int c2=m2.getcol(); if((r1!=r2)||(c1!=c2)) …

Member Avatar for Ancient Dragon
0
86
Member Avatar for guddukohli

)Seat Reservation prog for the theatre. Write a function for seat allocation for the movie tickets. Total no of seats available are 200. 20 in each row. Each row is referred by the Character, "A" for the first row and 'J' for the last. And each seat in a row …

Member Avatar for Ancient Dragon
0
69
Member Avatar for cosmos22

Hi. I'm designing something that uploads files to an FTP server of the users choice, so they quickly upload things and access them as a way of backing up files, almost. I would like to upload the file on the C: called pic.jpg as a test, but I've been having …

0
67
Member Avatar for TMD

my administrator at school blocked commands for command prompt so I can't use system pause or system color commands....anyone know a way around this?

Member Avatar for Joatmon
0
76
Member Avatar for Tsuruya-san

Hello, I'm new to this site and programming in general, so bear with me :$ . I've been downloading source code like crazy to reference, however I have yet to find a single project file for large projects (such as, for example, Half Life 2) that SHOULD compile correctly. Surprisingly …

Member Avatar for Tsuruya-san
0
114
Member Avatar for drtucker

i have a homework assignment asking me to pick the highest and lowest number out of a group of 4 numbers? How would i set that up?

Member Avatar for plgriffith
0
117
Member Avatar for taruj83

I know how to write a program for a multiple process scheduler using different algorithms but I wanna know how to implement the algorithm with 5 to 10 processors with different speeds and memory ( 256mb to 2gb). So far i know how to calculate the wait time with number …

0
54
Member Avatar for joufaf

Hi guys I'm trying to do a while loop since this afternoon for the code below but was unsuccessful. I'm reading from a file A family name and the number then the names belong to the family which will be like this JAMES SMITH MARY SMITH JOHN SMITH ROBERT JOHNSON …

Member Avatar for Ancient Dragon
0
110
Member Avatar for Jennifer84

I am writing this to a .txt file. The problem here is that it doesn´t compile when I write "\". Why does this happening because this is just a string ? I really need to get this "\" out to the file. Any idéas on this ? [code] ofstream out; …

Member Avatar for Jennifer84
0
116
Member Avatar for purepecha

/* I compiles this program it works, but my problem is. I cannot reset the original values after print the results, so the second function still carries the prevoius results. I want to use the same variable int parmA=12; int parmB=28; for both functions. Also any suggestions to get rid …

Member Avatar for mitrmkar
0
72

The End.