132,726 Archived Topics

Remove Filter
Member Avatar for
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++) …

Software Development c++
Member Avatar for Harshita_garg
0
144
Member Avatar for Mushy-pea

Hello everyone. I've run into a problem with regular expressions; the extraction "variables" ($1, $2, $3 etc.) are read only and scoped to the current block. If you need to do two regex extraction operations in the same block, is there a way to reset the ($1, $2, $3 etc.) …

Software Development perl regex
Member Avatar for Mushy-pea
0
141
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 …

Software Development c++
Member Avatar for iamthwee
0
120
Member Avatar for mcosciel

i'm using the included cd that came with my Deitel Deitel Third Edition C++ book. Help / about tells me i'm using visual C++ 6.0 I'm trying to compile a piece of code i wrote in FORTRAN. The code runs and accepts changes to my namelist but does not compile …

Software Development visual-studio
Member Avatar for Ancient Dragon
0
92
Member Avatar for nasduck

Hello, there: I am trying to calculate to the inverse of matrix A. How to call function to main part? How to write the code for a matrix? Can someone help me modify the errors? Thank you very much! -------- [code=c] #include "matrix.h" Matrix solve(const Matrix& A, const Matrix& B){ …

Software Development c
Member Avatar for iamthwee
0
97
Member Avatar for Phaelax

Is there a limit to how deep you can go with inner classes? Like having a class within a class, within a class, within a class, etc.... I'm just curious.

Software Development java
Member Avatar for jwenting
0
295
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]

Software Development c++
Member Avatar for may4life
0
78
Member Avatar for kie

Hey all Basically, I am trying to get my head around data validation. I am very new to C, in fact I have only been doing it a few days. I am trying to make a simple currency converter that validates that the data is numerical. Alos, I would like …

Software Development c
Member Avatar for WaltP
0
258
Member Avatar for sliver_752

Hi i am making a simle gui using wxpython and here is the script [code] import wx class bide(wx.Frame): def __init__(self): wx.Frame.__init__(self, None, -1, "just a test", pos=(0, 0), size=wx.DisplaySize()) panel = wx.Panel(self, -1) statusBar = self.CreateStatusBar() toolbar = self.CreateToolBar() #toolbar.AddSimpleTool(wx.NewId(), images.getNewBitmap(),"New", "Long help for 'New'") toolbar.Realize() menuBar = wx.MenuBar() …

Software Development gui python
Member Avatar for sliver_752
0
106
Member Avatar for ramsaryanmca

Dear all, im new to this forum.can u pls help me to do this one. i am reading a particular pdf file and searching for a particular word and how time it occured means number of occurences in that file.. pls assist me to do this one Thanx in advance.. …

Software Development c# pdf
Member Avatar for lok_tan
0
128
Member Avatar for nutwood33

I'm creating a simple little macro that draws a chart from some data in Excel. The frustration comes because every time my macro draws a chart, it sequences the number. The first chart is "chart 1" the second is "chart 2" even if "chart 1" no longer exists. I know …

Software Development visual-basic
Member Avatar for Tonye53
0
496
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]; } …

Software Development c++
Member Avatar for John A
0
114
Member Avatar for TylerSBreton

This block of code will compile, but gives me a runtime error: before the first comment is a header that is included in the file that you may need to analyze my code. [code= c] typedef char *string; typedef struct { string fieldName; string value; }oneField; /* this starts the …

Software Development c linked-list
Member Avatar for TylerSBreton
0
5K
Member Avatar for sneekula

I know that Pyhon compiles source code to a Byte Code before the interpreter works on it. What does this Byte Code look/behave like?

Software Development python
Member Avatar for vegaseat
0
148
Member Avatar for atrusmre

Say I have an edit box in a MFC application (let's call it IDC_EDITBOX), and I enable (because I have it greyed out by default)it using [code=c]GetDlgItem(IDC_EDITBOX)->EnableWindow(TRUE)[/code] How do I set the focus to that control? In other words, when I enable the control, how can I get the cursor …

Software Development c
Member Avatar for atrusmre
0
136
Member Avatar for Sin-da-cat

I'm pretty much new to using files, so I'm not sure if this is a banale question. Here's the assignment: "[I]Each line of the file dec.txt contains a whole number (>0). Write a program that creates a file called hex.txt. Each line of this file is to contain a string …

Software Development c file-system
Member Avatar for Sin-da-cat
0
214
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 …

Software Development c++
Member Avatar for mattyd
0
135
Member Avatar for batista06

Hey, while doing an assignment I came across a code. however, when I run it I get no output. would like to know why if anyone knows..... [code] #include <stdlib.h> #include <stdio.h> int main(int ac, char** av) { unsigned register int j,sum,dcnt, limit; unsigned int number,max; if (ac != 2) …

Software Development c
Member Avatar for batista06
0
105
Member Avatar for sneekula

I keep reading about endless loops, is that something you want or do you always have to control an endless loop situation?

Software Development python
Member Avatar for bumsfeld
0
131
Member Avatar for katharnakh

Hi all, Platform: winxp Version: Python 2.3 I have a task of reading files in a folder and creating an one excel file with sheets, one sheet per file, with sheet named as filename. I am facing problem in handling special characters. I am using XLRD and XLW package to …

Software Development python
Member Avatar for bumsfeld
0
154
Member Avatar for Prahaai

Hello. I have this problem: I have a let's say [1000] char string and i want to split and print this on the screen on more lines, so that each and every line has MAXIM 43 characters. The string may contain spaces and the words would be printed on the …

Software Development c
Member Avatar for Prahaai
0
91
Member Avatar for nugget93

I really dont know what category this should go in but, I would like to connect to a server made in vb to get data, how would i do this and how would i get php to send data to the server?

Software Development php visual-basic
Member Avatar for nugget93
0
73
Member Avatar for s88

the problem is that, the function is only replacing the number that I want to delete with th number after it, but everything remains the same after. e.g. it is showing me 1 2 3 5 5 6 7 8 9 10 [code] #include <stdio.h> int rem(int a[],int pLen,int pos) …

Software Development c
Member Avatar for nicentral
0
88
Member Avatar for siddhiinfomedia

Hello Friends... I've written a code for Simulating Paging algorithm using LRU... The code is in the attached file. Now on windows... it is executing perfectly, giving the output i desire... but on Linux REGAL gnu compiler, it is giving me the error... Error file is attached... as error2.jpg SEGMENTATION …

Software Development algorithm c
Member Avatar for Ancient Dragon
0
115
Member Avatar for kaka_shi

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

Software Development c++
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 …

Software Development c++
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

Software Development c++
Member Avatar for Ancient Dragon
0
140
Member Avatar for B.H

My problem is....i have done a project in VB.NET with SQL SERVER as the database. My project was running perfect until last day when i tried to run the project i got some errors. Errors : 1) Could not copy temporary files to O/P directory 2) The file Call Center.exe …

Software Development assembly vb.net
Member Avatar for B.H
0
139
Member Avatar for code321

Hi all... I have just started scripting in KShell and I have this code that extracts information out of a database under different fields. Now, if I further want to refine the data that is being extracted, say matching with a particular term under a particular field, can you please …

Software Development shell-scripting
Member Avatar for code321
0
91
Member Avatar for foo

I am still struggling with understanding the creation of objects. For example. int[] x = {4,5,6}; int[] y = new int[x.Length]; Why is it that for the first array, we can initialize it without the use of the new keyword yet in the second line, we need the new keyword? …

Software Development
Member Avatar for Godfear1
0
99
Member Avatar for killaruna

how can I force program in pascal to write its own source code from .exe file?:-|

Software Development pascal
Member Avatar for MattEvans
0
115
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 …

Software Development c++ first-post visual-studio
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 …

Software Development c c# c++
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){ …

Software Development c++
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; …

Software Development c c# c++
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 …

Software Development c++ file-system
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 …

Software Development c++
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. …

Software Development c++ first-post
Member Avatar for ~s.o.s~
0
97
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 …

Software Development c++
Member Avatar for may4life
0
84
Member Avatar for bnrup

I know absoulutely nothing about compiling source code other than you need MS Visual Studio to compile it. I have the express (free) version of it, can you compile in this version?

Software Development assembly visual-studio
Member Avatar for Ancient Dragon
0
155
Member Avatar for atrusmre

I am writing a MFC application and need to have the program pause for a few seconds. I am trying to use the OnTimer event and am having troubles. The following code causes the program to freeze and stop responding [code=c] m_iCount = 0; SetTimer(ID_TEST_TIMER, 1000, NULL); while(m_iCount <= 5) …

Software Development c
Member Avatar for Ancient Dragon
0
1K
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 …

Software Development c++
Member Avatar for WaltP
0
196
Member Avatar for steveballinger

I'm trying to write a function that takes an array of unsorted positive integers N elements long. The function should return the same array (no new allocations) with all duplicated integers replaced with -1 and moved to the end of the array. So for example, the string: 1136788999 becomes ... …

Software Development
Member Avatar for steveballinger
0
113
Member Avatar for pszlachetka

Hello, I'm having a Form.Show() hang up on me. I currently have one class that has a listen() method that runs in its own thread. Then I Have another class that is my actual Windows Form with all the GUI stuff. The listen() method calls methods of my Windows Form. …

Software Development gui
Member Avatar for lok_tan
0
75
Member Avatar for GreenDay2001

here's a piece of window procedure. What does DefWindowProc do in this program. [code] LRESULT CALLBACK WndProcedure(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) { switch(Msg) { case WM_DESTROY: // user wants to exit PostQuitMessage(WM_QUIT); break; default: // Hand off unprocessed messages to DefWindowProc return [B]DefWindowProc(hWnd, Msg, wParam, lParam)[/B]; } …

Software Development c
Member Avatar for Ancient Dragon
0
109
Member Avatar for jetyan

If I want to see a Dll file of a Program,and I have not find it in the declares and the 'system' file. I know it is there,how can I find it? thank you!

Software Development visual-basic
Member Avatar for jetyan
0
140
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 …

Software Development c++
Member Avatar for manutd
0
116
Member Avatar for sneekula

Which Graphics User Interface (GUI) would you recommend for a beginner? I have seen some examples of Tkinter, wxPython and GTK.

Software Development gui python tkinter user-interface
Member Avatar for vegaseat
0
435
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 …

Software Development c++
Member Avatar for Ancient Dragon
0
122
Member Avatar for jeevitha

need visual basic codes for dictionary search to take care of situations when people type in wrong spelling. Examples like google search engine, when people type in wrongly search engine actually helps to correct the words that are spelled wrongly Also need visual basic codes of auto fill in of …

Software Development google visual-basic
Member Avatar for iamthwee
0
83

The End.