132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for mrar85

Hello, i'm a newbie with c++.. all help and explanation are welcome..my problem is, i try to make a factorial program in c++ . Here is my code: [CODE]#include <iostream> using namespace std; int main() { int a,b,fact=1; char key; do { cout<<"\nPlease enter a positive integer : "; cin>>b; …

Software Development c++ programming-construct
Member Avatar for mrar85
0
2K
Member Avatar for creeps

Yes, it's yet another thread about implementing three basic operations (addition, subtraction and multiplication) on abnormally large numbers (> 100 digits). I've stored each digit inside an array of [icode]int[/icode]s, as the following piece of code illustrates [code=C] while((ch = getchar()) != EOL) a[len_a++] = ch - CHR; [/code] Now, …

Software Development c
Member Avatar for Shift-Stop
0
257
Member Avatar for dicas3d

I have this program [url]http://ostermiller.org/qqwing/qqwing.cpp.html[/url] I need run the program by code with parameters to do somehtin on interface. So how i load the data that i need to my program without change it. Note: I want make a program based on it [url]http://ostermiller.org/qqwing/qqwing.cpp.html[/url].

Software Development c++
Member Avatar for dicas3d
0
152
Member Avatar for mitrious

Here's what the book asked [B]The implementation of nrand in §7.4.4/135 will not work for arguments greater than RAND_MAX. Usually, this restriction is no problem, because RAND_MAX is often the largest possible integer anyway. Nevertheless, there are implementations under which RAND_MAX is much smaller than the largest possible integer. For …

Software Development c++
Member Avatar for mitrious
0
106
Member Avatar for tech9x

i got a .txt file that contain data, and i would like to read from the file and then write the data to another file, is it about ifstream and ofstream?.. what i have done is just open the input file and open the output file :(( how to relate …

Software Development c++ file-system
Member Avatar for vijayan121
0
4K
Member Avatar for Orangeweapons

Hi, this is my first C++ forum post. I'm having issues with including the library libcurl [U](found [URL="http://curl.haxx.se"]here[/URL])[/U]. I want to include it in my project so I can start working with it, because a friend of mine showed me just how powerful the library is. These are my specs: …

Software Development c++
Member Avatar for vijayan121
0
264
Member Avatar for Anthony Cameron

How do you create a Perl Program that asks a user to enter two numbers and assign those numbers to selections in a text and then reverse the text? I think I am supposed to use splice array and the reverse function but it is not coming out properly. print …

Software Development perl
Member Avatar for Anthony Cameron
0
255
Member Avatar for Tedius

Design a class for perform the following (without using any library function for string manipulation) Read a string (containing words and spacing characters) Find out the longest word in the string Compare two strings Find out the longest common sub string(word) of the two string Display a string

Software Development c++
Member Avatar for tkud
0
103
Member Avatar for vanan4u

question.. You are required to write a complete C program for a simple grading system. At the beginning of the system, you need to input number of students and number of subjects that have been marked. Then, you need to enter the student's identification number and marks for each subject. …

Software Development c
Member Avatar for vanan4u
0
154
Member Avatar for wvuengr33

The program I am writing is supposed to read in a txt file and then align the txt depending on the number of characters per line that the user has specified. Since there aren't any limitations to the length of the text it has to be represented using a dynamic …

Software Development c c# c++ data-structure linked-list
Member Avatar for wvuengr33
0
504
Member Avatar for vijaykrishnabor

hi please can anyone tell me the difference between virtual function and abstraction function .

Software Development c++
Member Avatar for mike_2000_17
0
134
Member Avatar for hotdang

Hello, I have written a C# console application that currently takes a data file as input, processes the data and writes out 2 new data files. I would like for it to be able to process ALL the files in a given directory. How might I do this? Thanks!

Software Development
Member Avatar for hotdang
0
140
Member Avatar for akshayabc

Plz answer my these C doubts- Q. 1- If i have 3 source files and i declare a static variable in the source file s2.c then which statement is true:- That static variable is created when the program starts executing and is destroyed when the whole program finishes executing. OR …

Software Development c++
Member Avatar for gayathri balu
0
182
Member Avatar for vijaykrishnabor

Hi is it possible to have recursive function as inline function ? this was question asked interview please help me

Software Development c++
Member Avatar for mike_2000_17
0
2K
Member Avatar for beginerC#

Hello everyone! I have a form with a datagridview and another form with textboxes. First I load the form with datagridview. This one has a button which open the form with textboxes to be fill. If all textboxes are filled and I clik a button of this form, I want …

Software Development
Member Avatar for beginerC#
0
93
Member Avatar for Tellalca

Hello, I really wonder that is it possible to open any file and play with the data inside it using C/C++ FILE pointer. I'm taking a lecture called Data Management and File Structures and there we are working with text and binary files. So I decided to research and work …

Software Development c++ file-system
Member Avatar for Ancient Dragon
0
161
Member Avatar for elchalateco

Hi all, How do I change bytes [text stored in those bytes] in a binary file? I have a little function that read bytes 335-343 [For Keyer] and bytes 344-352 [for verifier] and displays it. These bytes store who the keyerID and VerifierID of a data entry file are. From …

Software Development file-system vb.net
Member Avatar for elchalateco
0
240
Member Avatar for heidik

[code]breachmonitor.cpp:(.text+0x17ce): undefined reference to `BreachMonitor::Breach::Breach()'[/code] Can anyone please tell me what does it mean? I have created a struct and then declared its variable like [code] Breach wb; [/code] and it isnt compiling. The structure has default constructor (no arguments) and another one for initialization. It has also got two …

Software Development c++
Member Avatar for heidik
0
199
Member Avatar for alwaysLearning0

This is just for fun and to see how people do it, it will help me to learn different techniques also. If no one answers i will understand. :) Lets say you have a template class. You want a certain method of this class will have some sort of checking …

Software Development c++
Member Avatar for mike_2000_17
0
186
Member Avatar for fender422

My assignment was to make a game called 'World of Warcrap', and I finished, but there are errors. the errors are in respawnNPC(), attack(), and fightToTheDeath() methods. here are the instructions on what each methods are suppose to do: 1) Define the respawnNPC method inside the WorldOfWarcrap class such that …

Software Development java
Member Avatar for kramerd
0
188
Member Avatar for jdsurgeon

For some reason when i run this link statement I get this error not sure why am I getting it but it doesn't make any sense. I am not even doing a conversion. the field I am counting is a string field but the alias is a variable. Conversion failed …

Software Development vb.net
Member Avatar for jdsurgeon
0
107
Member Avatar for BarnacleBoy

Hey everybody, I need to send the output data from a .cpp file to a .csv file so that I can import it into excel for further work. I was reading some stuff online, but I was getting confused. I need the data in the .csv file to look like: …

Software Development c++
Member Avatar for BarnacleBoy
0
78
Member Avatar for knan

I have a file named test.txt I get the file [CODE]file=open("test.txt","r") obj=file.read() file.close() print obj a=a b=b c=c d=e e=d e=f f=e f=g g=h[/CODE] All I want to do with this obj is that, I've to create a regular expression such that, 1.If the left number matches the right number, …

Software Development file-system python regex
Member Avatar for TrustyTony
0
203
Member Avatar for mitrious

I'm studying the Accelerated C++ book in the 7th chapter it teaches how to create random sentences from an input that goes like this words between brackets work as categories and <sentence> is the category that defines how the sentence will be organized example: I enter the lines: <sentence> the …

Software Development c++
Member Avatar for mitrious
0
170
Member Avatar for heidik

Could somebody please tell me how do I write a file in "try catch" block for checking if the file exists, if it is opened, if it is not empty. This is the error message I get when the file not exist or it is empty. [code] terminate called after …

Software Development c++ file-system
Member Avatar for heidik
0
87
Member Avatar for SindujaArun

hi i just want to know how to display data in the listview.Here is my code: [code] Sub viewAttendance() da = New SqlDataAdapter("select AttendanceDate,TimeIn,TimeOut,LateMin from tbl_Attendance", con) ds.Tables.Clear() 'da.SelectCommand = cmd da.Fill(ds, "tbl_Attendance") 'Dim krow1 As Integer = ds.Tables(0).Rows.Count With lvwAttendance .Clear() .View = View.Details .FullRowSelect = True .GridLines = …

Software Development display listview vb.net
Member Avatar for AndreRet
0
116
Member Avatar for sti

...will you pls help me with regards about my project.. it was a database and i've already created a form (user interface form for inputing data) with visual basic 6.0.. my prblem is, if the user wants to edit the data he entered how does he do that?.. send me …

Software Development user-interface visual-basic
Member Avatar for AndreRet
0
161
Member Avatar for locsin

Greetings Anybody know how to change the position of form controlbox(Minimized, maximized, close) button. Original location is on the top right of the screen. I want to relocate it on the top left. Thankyou in advance

Software Development visual-basic
Member Avatar for AndreRet
0
100
Member Avatar for ceyesuma

Hello. I have an app (JDesktop) and it has the JMenu and some JMenuItems. One will build an JTabbedPane with a dozen or so tabs. I start that one and it works good. Another MenuItem builds another Internal Frame with JtabbedPanels it works too. When I go back to the …

Software Development java
Member Avatar for ceyesuma
0
143
Member Avatar for realproskater

So, i got this much done so far but im stuck and i cant get my third case statement to work, also for some reason it prints off the calendar like days 8 9 10, etc, if you copy and paste and run it you will see it doesnt line …

Software Development c++
Member Avatar for realproskater
0
595
Member Avatar for tKc

We are required to make a c++ program to determining the cos of x by using the taylor series. i have made my program and it works pretty good but we are also required to stop the loop after the terms in the taylor series gets lower than .0001. any …

Software Development c++
Member Avatar for Nathaniel10
0
384
Member Avatar for bufospro

Hi, I am trying to read a string using the function below. The problem I have is that I can't write space in my string. So strings like : "name fullanme" are rejected and returns only "name". [CODE] char *getstring(char *ret, int max) { char *ppp, *qqq; int invalid_characters=0; //fgets(ret,max,stdin); …

Software Development c
Member Avatar for bufospro
0
185
Member Avatar for aint

is it possible to use the variable list from a function? here is an example? is it possible to call alist with its last used content? [CODE] def example(a): alist=[] alist.append(a) print alist example(1) print alist [/CODE] thanks

Software Development python
Member Avatar for Gribouillis
0
99
Member Avatar for programing

Hi , pls i need your help . i write algorithm that calculate prefix average .. sum=0 for i=1:n do sum =suma+a[i] b[i]=sum/i return array b my teacher said , write above code using insted for .. how i can use the other for .. what are your opinion?

Software Development algorithm c++
Member Avatar for Fbody
0
256
Member Avatar for gwong

Hi all, I am attempting to use the LWP::UserAgent to request a Soap call, and in the response the request returns a TIFF image. When I write the contents out to a file(binary mode), the file also contains header information. How would I go about extracting just the body(TIF image) …

Member Avatar for joemarG11
0
452
Member Avatar for dbirely

Using Visual basic 2008 is the following possible if so how? Min Pts..............Max Points...........Grade 0.....................299..................F 300...................349..................D 350...................399..................C 400...................449..................B 450...................500..................A using two one dimensional arrays (min pts as int and Grade as string) in parallel, can the range of 0 to 299 return F, 300 to 349 return D ...etc?

Software Development vb.net visual-basic
Member Avatar for dbirely
0
140
Member Avatar for pdk123

Hi, Trying to learn STL. I tried implementing the dynamic array with the STL. I wrote the following code and tried with int array works fine, but when i try with string array input, i get the error..can you please help me, [CODE]#include <iostream> #include <vector> using namespace std; template …

Software Development c++
Member Avatar for pdk123
0
188
Member Avatar for tKc

I am trying to learn parameters by reference. In my code i try to compute the sum between 1 and n. This is what i got so far and if i input 5 it outputs a extremely high number. Any suggestions? [CODE] #include <iostream> #include <cmath> using namespace std; void …

Software Development c++ mathematics
Member Avatar for csurfer
0
133
Member Avatar for ace8957

Hi all, So I'm working on this program to detect if the w' in a string in the form of w$w' satisfies the condition that w' is the reverse of w. The only problem is that I have a logic error that I don't understand. If I input the string …

Software Development c++ storage
Member Avatar for ace8957
0
235
Member Avatar for danish_izads

[CODE]#include<fstream.h> #include<stdio.h> #include<string.h> char num; int don; class sudoku { public: void putin(); int retchar(); void putout(); char name[30]; int a1,a2,a3,a4,a5,a6,a7,a8,a9,b1,b2,b3,b4,b5,b6,b7,b8,b9,c1,c2,c3,c4,c5,c6,c7,c8,c9,d1,d2,d3,d4,d5,d6,d7,d8,d9,e1,e2,e3,e4,e5,e6,e7,e8,e9,f1,f2,f3,f4,f5,f6,f7,f8,f9,g1,g2,g3,g4,g5,g6,g7,g8,g9,h1,h4,h2,h3,h5,h6,h7,h8,h9,i1,i2,i3,i4,i5,i6,i7,i8,i9; }; void sudoku::putin() { cout<<"\nEnter the Character of Sudoku "; cin>>num; cout<<"\nEnter the Name of Sudoku "; gets(name); cout<<"\nEnter the Values of first row "; cin>>a1>>a2>>a3>>a4>>a5>>a6>>a7>>a8>>a9; cout<<"\nEnter the Values …

Software Development c++ ios
Member Avatar for danish_izads
0
183
Member Avatar for pradeepc1

Hello all, 1) I want to know how to use the serial component in the toolbox of VB2008 express edition. 2) I want to how to plot a graph in VB2008 express edition.

Software Development vb.net
Member Avatar for anandharaajan
0
227
Member Avatar for punchinello

[CODE]class HRException { public: HRException() : m_pMessage("") {} virtual ~HRException() {} HRException(const char *pMessage) : m_pMessage(pMessage) {} const char * what() { return m_pMessage; } private: const char *m_pMessage; };[/CODE] It's a definition of an exception class I guess. How does the colon and the following "m_pMessage("")" work? Why does …

Software Development c++
Member Avatar for punchinello
0
133
Member Avatar for deepak.hm123

Somone please help me writing a code for "Reverse a word in a String" in c.. Ex: My name is XYZ o/p:XYZ is name My

Software Development c
Member Avatar for N1GHTS
0
214
Member Avatar for koduruabhinav

hi,i was a beginner in java i have a doubt. we use import to use the predefined classes. we can also use package for importing classes. import java.lang.*; package java.lang.*; [B] what is the difference between imports and package at what time we have to use differently.[/B] plese try to …

Software Development java
Member Avatar for koduruabhinav
0
132
Member Avatar for samp4ever

Hi everybody, I'm doing a simple client server communication system. The client have to send in a TCP socket a couple of strings and the server receive them, then have to search in a buffer if a category is similar to even just one of the strings sent by the …

Software Development c client-server
Member Avatar for samp4ever
0
700
Member Avatar for claudiordgz

Hi guys, I'm new at C++ and I'm learning the basics on binary files This is what I've done: 1.- I created a class Criminal with basic data (age, crime type, criminal name) [CODE] class Criminal { private: int vnSerie; char vNombre[ 36 ]; char vtCrimen[ 20 ]; int vEdad; …

Software Development c++ ios
Member Avatar for Ketsuekiame
0
191
Member Avatar for manaila

Hi I'm new to Java and I was dealing with the creation of packages. Suppose I have the following two source files which I want to put in one package called [B]mypackage[/B]. The two source files are in the (Linux) directory: [B][I]/home/user/workspace/mypackage[/I][/B]. [CODE] package mypackage; public class HelloWorld { public …

Software Development java
Member Avatar for Shanki87
0
139
Member Avatar for joss23

Create an array of Strings, each containing one of the top 10 reasons that users like in programming with Java as listed below. Prompt a user to enter a number from 1 to 10, convert the number to an integer, and then use the integer to display one of the …

Software Development java
Member Avatar for joss23
0
109
Member Avatar for Dark_Omen

Hello, I am trying to read this xml file. But whenever I get to the load part of it, it gives me this error: "[size=1][size=2]The data at the root level is invalid. Line 1, position 1"[/size] [/size] [size=1][size=2]This is the code I am working with:[/size][/size] [size=1][size=2][code][/size][/size] [size=1][size=2][color=#0000ff]public[/color][/size][size=2][color=#0000ff]static[/color][/size][size=2] Response Message([/size][size=2][color=#0000ff]string[/color][/size][size=2] doc)[/size][/size] …

Software Development c# xml
Member Avatar for bbauraj
0
634
Member Avatar for Dr.Del

Hi, I am a pastor of a small church. I am 67 years old. I am trying to learn to program an address book for our church lay people. I am using the a book titled, “Beginning Visual Basic 6 Database Programming” by John Connell. I managed to get along …

Software Development visual-basic
Member Avatar for Mohidul
0
202

The End.