51,593 Topics

Member Avatar for
Member Avatar for raja_bose2004

Hi Everyone, I developed an application using MCI(Media Control Interface) in VC++ ... Actually i designed a media player .... It is able to play mpeg1, vob, dat and avi file format BUT I am not able to play mpeg2 format (with m2p or mp2 file extension).... CAN ANYONE TELL …

0
48
Member Avatar for centos123

Hi I have a text file which has 4 heading which will constitute the number of columns and based on values an array has to be populated. To give a clear picture it is as: input text file looks like: heading1 value1 10 value2 10 11 heading2 value3 10 11 …

Member Avatar for centos123
0
197
Member Avatar for aznballerlee

[code] #define _CRT_SECURE_NO_DEPRECATE #include <iostream> #include <fstream> #include <cstring> #include <cctype> #include <cstdlib> #include <ctime> using namespace std; const int MAXWORDS = 8000; const int MAXWORDLENGTH = 6; const int MINWORDLENGTH = 4; int nWords; void fillWords(char words[][MAXWORDLENGTH + 1], int maxwords, int& num); int playOneRound (int wordnum); void correct …

Member Avatar for ~s.o.s~
0
119
Member Avatar for hoosier23

This program is supposed to show the adjacency lists that are built given the input pairs:: 0-2, 1-4, 2-5, 3-6, 0-4, 6-0, and 1-3 I am having trouble with the syntax of my code. Could someone please help? [code] #include <iostream> using namespace::std; int V; struct node { int v; …

Member Avatar for hoosier23
0
353
Member Avatar for batista06

I stumbled on this function that calculates #'s that are perfect, how ever I do not understand why it works. any one care to explain? [code] int perfect(int num,int den) { int rem = num - ((num/den)*den); if (rem==0) return(den); else return(0); } [/code]

Member Avatar for DavidRyan
0
116
Member Avatar for matrimforever

I need help figuring this out. What I need is this:[LIST=1] [*]The section number, as a string [*]The instructor's name, also as a string [*]The number of students in this section, as an integer. [*]The student's scores for the test, as an array of integers. Declare this array to be …

Member Avatar for Ancient Dragon
0
109
Member Avatar for Harshita_garg

Hi Frenz! Please go through the following program made for matrices:- [code=cpp] template <class T> class Matrix { private: int dim1;int dim2; T **mtx; public: Matrix(int a) { dim1=dim2=a; mtx=new T*[dim1]; for(int i=0;i<dim1;i++) mtx[i]=new T[dim2]; } ~Matrix() { delete []mtx; } Matrix<T> operator +(Matrix<T> M) { Matrix C(dim1,dim2); for(int i=0;i<dim1;i++) …

Member Avatar for Harshita_garg
0
144
Member Avatar for matrimforever

i need a function: readData() to read in scores from a file. I can open a file up, but not sure how to code it so input from the user opens any file. [code] int readData() { cout << "Please enter in the path to the student score file: " …

Member Avatar for Ancient Dragon
0
85
Member Avatar for angel_e1205

Hello, I've been creating a page in php that needs to invoke heavy calculation functions for which I've created dinamic extensions for linux (.so) in c++, but there's one problem I have in one of those functions, I need to modify an array passed to that function by reference and …

Member Avatar for iamthwee
0
120
Member Avatar for gemacjr

Unable to correct this [code] void main() { char string[20]; char *aString=string; function (aString); } void function(char *name) { cout<< "enter name"; cin >> *name; cout << name; } [/code]

Member Avatar for may4life
0
78
Member Avatar for Shiva_nan

Is it possible to create reports using Dev C++?.. If so can anyone suggest piece coding stuff to do this.. Thanks in Advance., Shiva

Member Avatar for Ancient Dragon
0
93
Member Avatar for kasun_04

I got few problems in Process creation and IPC in Solaris using C++. This is my problem in a nutshell. --I do have main process ---> A (say) ---And I want to create child processes of A which are doing independent tasks. (say C1, C2, C3, ....etc) Interface of A …

Member Avatar for Salem
0
127
Member Avatar for gemacjr

[code] [COLOR=#0000ff]#include[/COLOR][COLOR=#800000]<iostream>[/COLOR] [COLOR=#0000ff]using [/COLOR][COLOR=#0000ff]namespace[/COLOR][COLOR=#000000] std;[/COLOR] [COLOR=#0000ff]const[/COLOR][COLOR=#0000ff] int[/COLOR][COLOR=#000000] namesize=21;[/COLOR] [COLOR=#0000ff]void[/COLOR][COLOR=#000000] getName([/COLOR][COLOR=#0000ff]char[/COLOR][COLOR=#000000],[/COLOR][COLOR=#0000ff]int[/COLOR][COLOR=#000000]);[/COLOR] [COLOR=#0000ff]void[/COLOR][COLOR=#000000] main()[/COLOR] { [COLOR=#0000ff]int[/COLOR] index=5; [COLOR=#0000ff]int[/COLOR] count; [COLOR=#0000ff]char[/COLOR] names[21]; [COLOR=#0000ff]char[/COLOR] *aString=names; [COLOR=#0000ff]for[/COLOR](count=0;count<index;count++) { [COLOR=#0000ff]char[/COLOR] names; getName(*aString,index); cout << [COLOR=#800000]"You entered: "[/COLOR]; cout << &names; } } [COLOR=#0000ff]void[/COLOR][COLOR=#000000] getName ([/COLOR][COLOR=#0000ff]char[/COLOR][COLOR=#000000] names[][21], [/COLOR][COLOR=#0000ff]int[/COLOR][COLOR=#000000] index)[/COLOR] { cout << [COLOR=#800000]"enter a name: "[/COLOR]; cin …

Member Avatar for Ancient Dragon
0
89
Member Avatar for gemacjr

[COLOR=#0000ff][code]#include<[/code][/COLOR][code=c][color=#800000]iostream>[/color] [color=#0000ff]using [/color][color=#0000ff]namespace[/color][color=#000000] std;[/color] [color=#0000ff]consta[/color]code][color=#0000ff]nt[/color][color=#000000] namesize=21;[/color] [color=#0000ff]void[/color][color=#000000] getName([/color][color=#0000ff]char[/color][color=#000000],[/color][color=#0000ff]int[/color][color=#000000]);[/color] [color=#0000ff]int[/color][color=#000000]main()[/color] { [color=#0000ff]int[/color] index=5; [color=#0000ff]int[/color] count; [color=#0000ff]char[/color] names[21]; [color=#0000ff]char[/color] *aString=names; [color=#0000ff]for[/color](count=0;count<index;count++) { [color=#0000ff]char[/color] names; getName(*aString,index); cout << [color=#800000]"You entered: "[/color]; cout << &names; } } [color=#0000ff]void[/color][color=#000000] getName ([/color][color=#0000ff]char[/color][color=#000000] names[][21], [/color][color=#0000ff]int[/color][color=#000000] index)[/color] { cout << [color=#800000]"enter a name: "[/color]; cin >> names[index]; } …

Member Avatar for John A
0
114
Member Avatar for mattyd

I am working to add some simple user input checking into my program; there are three (3) int choices from a menu-- 1, 2, or 3. The user must choose one of these. I am able to check whether or not the input is 1, 2, or 3-- but I …

Member Avatar for mattyd
0
135
Member Avatar for kaka_shi

hi members...please help me about this code...the sum code is like the attachment below...

Member Avatar for Ancient Dragon
0
160
Member Avatar for atrusmre

I am writing a MFC application and would like to change the font size of some of the static text. So I use the following. [code=c] CFont m_font; m_font.CreatePointFont(120,"Times New Roman"); m_Test.SetFont(&m_font); m_Test.SetWindowText(strTest); [/code] Now my question is, how to I get the layout editor in Microsoft Visual C++ to …

Member Avatar for Ancient Dragon
0
105
Member Avatar for Luckychap

I have just started C++, i have problem in understanding virtual functions. can anybody tells me what are v.f. and most important what is there importance in C++. Thanks

Member Avatar for Ancient Dragon
0
140
Member Avatar for Luwigie

Hello there. This is obviously my first post on DaniWeb, as I just found the site in searching for a solution to my issue. I've read over the site rules, as well as the forum rules regarding homework help. Let me start out by saying I am [U]not[/U] looking for …

Member Avatar for Luwigie
0
170
Member Avatar for aznballerlee

I'm having a hard time generating a "secret word" that is random. I'm taking a random word from the wordList array, and using it in the playOneRound function. Here is part of my instructions: [code] Using wordList[wordnum] as the secret word, this function plays one round of the game. It …

Member Avatar for aznballerlee
0
166
Member Avatar for teddy13

Hi everyone, av been trying to come up witha program that will tell if a string is a plindrome.This wat i did and i can't realise the error; [code] #include<iostream> #include<string> using namespace std; int main(){ string s; string s2; getline(cin,s); s2=s; string::iterator pos; string::iterator pos2; bool check;check=true; for(pos=s.begin(),pos2=s.end()-1,pos!=s.end(),pos2!=s.begin()-1,pos++;pos2--;){ if(*pos!=*pos2){ …

Member Avatar for may4life
0
107
Member Avatar for webspy

I'm working on a plugin system for my application. The plugins are in the form of a dll loaded by my application using [inlinecode]LoadLibraryEx[/inlinecode]. I store information about each plugin in an arrray of structs: [code] typedef struct _InternalPluginInfo { UINT ID; HMODULE Module; int Flags; PluginInfo Info; } InternalPluginInfo; …

Member Avatar for webspy
0
156
Member Avatar for earlyriser

Hello. I'm having problems filling an array from a text file. I cann't figure out how this works with getline. I can read read and store ALL the lines, but what I'm trying to do is to store ONLY the names of the employees (from the text file) to a …

Member Avatar for earlyriser
0
202
Member Avatar for JRM

Wrestling with more concepts here... Other than the syntax, there doesn't ssem to be much difference between the aggregation and public inheritance. Pretty much they allow the usage of functions from another class-right? One can slightly modify the the inherited function but not the aggregated ones? Why so many ways …

Member Avatar for ~s.o.s~
0
96
Member Avatar for jessiegirl

In need some homework help again. Please I am new at this and PLEASE PLEASE do not post YELLING post at me for wrapping the code because I don't know what that is. If you would like to explain it to me in plain english I am willing to learn. …

Member Avatar for ~s.o.s~
0
98
Member Avatar for teddy13

[code]//This progam accepts marks of 4 different subjects by 5 students. //Then calculates the average score of each subject and displays the result. #include<iostream> using namespace std; //This functions, get the average of each subject. int avrgProg(int PDenis,int PTriza,int PWinnie,int PTeddy,int PJoy); avrgProg= avrgp; avrgp=(PDenis+PTriza+PWinnie+PTeddy+PJoy)/5; return avrgp; int avrgSD(int SDDenis,int …

Member Avatar for may4life
0
84
Member Avatar for mcweezle

So I have been plugging away at this program. I had to create a menu and have 3 sections. Section A asked for a limit, then the user enters that many numbers and it tells them which number was the largest. DONE that. Section C quits the program.. that works …

Member Avatar for WaltP
0
196
Member Avatar for AnG'

Once I completed the following code, compiled.....this is what displayed: Number of 'mild' jars sold. (That's it). Is there something wrong with my C-prompt? Did I miss something? the code is sappose to: [COLOR=#000000]Prompt the user to enter the number of [/COLOR][COLOR=#000000]jars sold for each type. Once this sales data …

Member Avatar for manutd
0
116
Member Avatar for dev.cplusplus

Hi again, I have the following question, I have the following problem: I have an array and a function that receives the array, the problem is that the function is declared like this [code] void MyFunc(int **my_array) { for ( i=0; i<10; i++) (*my_array)[i] = 0; } [/code] And when …

Member Avatar for Ancient Dragon
0
122
Member Avatar for CurtisBridges

Here's a better explantion. Thanks! This part"A" is already finished: A). Create a menu with the following options, (1) Add, (2) Update, (3) Delete, (4) Sort, (5) Print, and (6) Quit. Create an array of 10 strings up to 25 characters long and initialize each one to "none". Each item …

Member Avatar for CurtisBridges
0
103
Member Avatar for wheelz

[code=c] /// // Program; Project2.cpp // Date; // Purpose: // Description: // Input: // Output: // Use: This program is compiled and executed using // Microsoft Visual Studio C++.net 2003 Version 7.1 #include "stdafx.h" #include <iostream> // access input/output stream. #include <string> #include <cctype> using namespace std; int StateNumber(char, char); …

Member Avatar for Ancient Dragon
0
118
Member Avatar for GreenDay2001

I use Visual c++ 6.0 enterprise. However, for few days i am not being able to build any program due to some linker error. I am getting following message, [code] --------------------Configuration: main - Win32 Debug-------------------- Compiling... view.cpp winmaker.cpp control.cpp Linking... LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main Debug/main.exe : …

Member Avatar for Ancient Dragon
0
94
Member Avatar for webspy

I'm developing a simple address book application which displays it's entries in a listview control. The entries are loaded from a file and stored in a array. My problem is I can't find a way to link the listview with the array (assign each item in the listview an ID …

Member Avatar for Ancient Dragon
0
315
Member Avatar for jan1024188

ok here is window [CODE]#include <windows.h> /* Declare Windows procedure */ LRESULT CALLBACK WindowProcedure(HWND, UINT, WPARAM, LPARAM); /* Make the class name into a global variable */ char szClassName[ ] = "jan birsa"; int WINAPI WinMain(HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPSTR lpszArgument, int nFunsterStil) { HWND hwnd; /* This is the …

Member Avatar for jan1024188
0
136
Member Avatar for mattyd

Hello: Something as seemingly simple as an If\ Else statement is causing me much trouble and I cannot figure out where the error lies. I believe it to be in:[LIST] [*]The variable scope [*]The use of the static variable [*]Or, the misplacement of curly brackets (something that has a tendency …

Member Avatar for nanodano
0
238
Member Avatar for CurtisBridges

[COLOR=#008000]//I need to modify this code by changing the sort function to make it recursive [/COLOR] [COLOR=#008000]//and add a recursive binary search that prompts the user to enter a search item.[/COLOR] [COLOR=#008000]//I have added some code for the search, which I will mark with[/COLOR] [COLOR=#008000]// :mrgreen: commented out on previous …

Member Avatar for CurtisBridges
0
83
Member Avatar for Chaky

I think ppl should read this post. Short story: I was installing and reinstalling windows, troubleshooting some hardware incompatibility issues that I'm experiencing. I wanted to preserve my AV software as it is now, so I wouldn't have to download upgrades (~10 MB) via modem again. I've opened registry editor …

0
285
Member Avatar for CurtisBridges

#[URL="http://www.gidforums.com/showpost.php?p=52405&postcount=13"][B][COLOR=#0000ff]13[/COLOR][/B][/URL] [URL="http://www.gidforums.com/t-12089.html?page=2#"][IMG]http://www.gidforums.com/images/buttons/reputation.gif[/IMG][/URL] [IMG]http://www.gidforums.com/images/statusicon/post_old.gif[/IMG] 10-[URL="http://www.gidforums.com/member.php?u=10954"][COLOR=#8c6239]allican57@yahoo[/COLOR][/URL] [IMG]http://www.gidforums.com/images/statusicon/user_online.gif[/IMG] vbmenu_register("postmenu_52405", true); New Member [IMG]http://www.gidforums.com/images/gid/ranks/rank1_5.gif[/IMG][IMG]http://www.gidforums.com/images/gid/ranks/rank1_5.gif[/IMG] Join Date: Sep 2006 Posts: 21 [IMG]http://www.gidforums.com/images/reputation/reputation_pos.gif[/IMG] Nov-2006, 15:17 I need to modify this code by changing the sort function to make it recursive and add a recursive binary search that prompts the user to enter a search item.I have …

Member Avatar for Salem
0
134
Member Avatar for taruj83

I have this program but need to adjust a little bit. At first it asks to enter an expression but I can only enter it in this form -> 7*(23-2)+10 but i want to enter it like this -> 7 * (23- 2)+ 10; therefore the program should ignore the …

Member Avatar for iamthwee
0
125
Member Avatar for kumarangopi

[COLOR=#000000]Does we need turbo c software to run turbo c exe file?[/COLOR] Hmmm sounds wierd! I wrote a program called chart.c in turbo c which is two header files like bimap.h ,xyz.h.When I compile,chart.exe is created.when i run chart.exe in some other machine, its not running unless tc sofware and …

Member Avatar for kumarangopi
0
183
Member Avatar for astrojith

Well, first of all, I'm astrojith. I'm new here at Daniweb. So, hello all of you :cheesy: !! . Now, to my question. In school, I'm being taught programs which all use "void main()". But, I've seen a lot of code using int main(). I asked my teacher about this …

Member Avatar for chunkmartinez
0
496
Member Avatar for compshooter

I am just trying to print out my array of binary values from 0 to 15. The output I get is wrong, very very wrong. Can someone take a look at my code and enlighten me? [code] #include <iostream> #include <conio.h> using namespace std; int binA[16][4] = { (0,0,0,0),(0,0,0,1),(0,0,1,0),(0,0,1,1), (0,1,0,0),(0,1,0,1),(0,1,1,0),(0,1,1,1), …

Member Avatar for compshooter
0
132
Member Avatar for merck120

I am currently working on a program in C, that needs to calculate the permutations of a n integer array. The approach that I have taken is using recursion, using a n-element array of counters incrementing the correct value each recursion, so the subroutine calls itself x (x being the …

Member Avatar for merck120
0
364
Member Avatar for kararu

A c++ project has to have a web based interface. Anyone pls suggest what languages/frontends are the choices here?

Member Avatar for John A
0
84
Member Avatar for bucsoldier03

i had to make a program that avereage the scores of test grades and displayed the highest grade made and also the lowest grade made and the test average. it also showed the number of vaild scores to. after making the program i have to convert it to C language. …

Member Avatar for pigeonfoot
0
1K
Member Avatar for kipl20

[COLOR=#000000]hi i am a beginner in c++ and have these shapes( in the attached word doc) to do using for the for the first set for loops, the second while loops and the third set do while loops. i already have done the first 2 shapes [/COLOR]with[COLOR=#000000] this code:[/COLOR] [code=C++] …

Member Avatar for ~s.o.s~
0
265
Member Avatar for snedan

I need help with following algorithm: Initaliaze a counter at 2; So long as the counter is less then or equal to number; if the counter divides the number evenly; //<<==problem display the counter; else add one to the counter; ------- so i just cant figure how to check: "if …

Member Avatar for WolfPack
0
104
Member Avatar for newbie2c++

Hi everyone! So I can't seen to get this program to compile and run. THis is exactly what I'm shooting to do: This program should calculate which division in a company had the greatest sales for a quarter. It should use the following functions: [LIST=1] [*]A function should ask the …

Member Avatar for John A
0
192
Member Avatar for Barefootsanders

Hey guys. I have a problem. I have to read in 2 arrays from 1 file. I know how to read in an array with known elements but this time the number of rows/columns are in the file. The first line has the dimensions of the array(rows columns) then the …

Member Avatar for ~s.o.s~
0
112
Member Avatar for bokim
Member Avatar for WaltP
0
135

The End.