43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for sneekula

I want to see if a certain word is in a text file, how do I go about that?

Software Development python
Member Avatar for sharma_vivek82
0
196
Member Avatar for fredzik

G'day, I've been googling for the last three weeks :eek: trying to get an example of a program larger than a simple "Hello World" that works inside it's own GUI. I've been working on the "GUI with calculator" in this same section of Daniweb, but as soon as I put …

Software Development first-post gui python
Member Avatar for fredzik
0
162
Member Avatar for sap.hit21

Hi all, I have faced some problem ina coding. What I have to do is just to replace all "big" with "small" from the string " The world is big. there are big cities. Bigger city mean bigger population. Towns are getting smaller". My code is [code=c] #include<stdlib.h> #include<stdio.h> #include<string.h> …

Software Development c unix
Member Avatar for sap.hit21
0
94
Member Avatar for pc0019

Hi I've just picked up a copy of SAMS teach yourself C in 21 days (I dont think Ill finish it that quickly) because I wanted to get into programming. I've worked through the first chapter, but keep enountering a problem: my programs exit before I can see what they …

Software Development c c# c++
Member Avatar for pc0019
0
132
Member Avatar for alba07

Can someone help me fix this? After I compile I get ilegal start of expression for the line that says public String getBook(). I cannot see why this is not allowed. My output should be as follows: Jane Doe Long night 12.5 Long Night by Jane Doe I am supposed …

Software Development java
Member Avatar for alba07
0
55
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...

Software Development c++
Member Avatar for Ancient Dragon
0
115
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. …

Software Development c++
Member Avatar for naya22
0
116
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 …

Software Development c++
Member Avatar for iamthwee
0
112
Member Avatar for mrjoli021

I have a csv file that I need to be able to read it into a struct array. I have read examples and they all match what I have. [code] [COLOR=#0000ff]void[/COLOR][COLOR=#000000] ReadStudents ()[/COLOR] { fstream infile; [COLOR=#0000ff]int[/COLOR] i; infile.open ("c:\\students.txt"); [COLOR=#0000ff]for[/COLOR] (i =0; i < 20; i++) { infile >> …

Software Development c
Member Avatar for mrjoli021
0
92
Member Avatar for aot

Does anyone know if there's a way to make a larger entry box in Tkinter? I'm looking to allow users to enter comments at the end of my program, so there should be plenty of space.

Software Development python tkinter
Member Avatar for aot
0
88
Member Avatar for john99

Hi everyone I am relearning to use VB after taking classes almost 10 years ago. I am stumped on remebering how to open a file using a command button. I have created some forms using VB that I want to activate from a main menu. I have made them .exe …

Software Development visual-basic
Member Avatar for bitbucket
0
315
Member Avatar for MarzenaM

Hi! I am doing program to calculate votes. its very simple but .......... up to what I did so far it doesn't want to calculate the first vote. Please tell me what i am missing? It's what i did so far.[code=c] char choice; int total, voting_station, votes,spoiltVote, totalA, totalB, totalC, …

Software Development c++
Member Avatar for MarzenaM
0
83
Member Avatar for kxh29

[B]Good Day to All:[/B] [B]I need to know if there is a code snippet somewher that will allow me to take a users START DATE and give them a maximum of seven(7) for a END DATE.[/B] [B]Problem is, on my AIX box, we DO NOT HAVE THE Date::Calc Perl Module.[/B] …

Software Development perl
Member Avatar for kxh29
0
139
Member Avatar for mrjoli021

I have a two dimensional array that I need to make into a global variable to be able to access it from other functions. I can't quite figure out what the correct syntax is. [code] [COLOR=#008000] [/COLOR][COLOR=#0000ff]#include[/COLOR][COLOR=#000000] "stdafx.h"[/COLOR] [COLOR=#0000ff]#include[/COLOR][COLOR=#000000] <iostream>[/COLOR] [COLOR=#0000ff]#include[/COLOR][COLOR=#000000] <fstream>[/COLOR] [COLOR=#0000ff]#include[/COLOR][COLOR=#000000] <string>[/COLOR] [COLOR=#0000ff] using[/COLOR][COLOR=#000000] [/COLOR][COLOR=#0000ff]namespace[/COLOR][COLOR=#000000] std;[/COLOR] [COLOR=#0000ff] void[/COLOR][COLOR=#000000] …

Software Development c++
Member Avatar for Aia
0
124
Member Avatar for addicted

:rolleyes: I need some one to define prime numbers for me A full definition, I am trying to write a program to determine wether a number is prime, print all prime numbers in a specific range ... e.t.c so i need a full definition of prime numbers, i know prime …

Software Development c
Member Avatar for Lardmeister
0
87
Member Avatar for mrjoli021

in c++ how do I get the size of a string array. sterlen(arrayname) does not work or size(arrayname) either. I am getting sterlen or size as idenitfier not found at compile time.

Software Development c++
Member Avatar for WaltP
0
224
Member Avatar for Phily

I would like to write a programme that can demonstrate how gravity work by showing bouncing balls on the screen- the idea is that the user can set the strength of the gravity, and then see how the balls react and bounce differently depending on how strong gravity is. I …

Software Development pascal
Member Avatar for Phily
0
107
Member Avatar for bondo

I'm working on a program where I'm reading a file and I have to count the number of entries in the file. Each entry takes up a different number of lines, but each entry is also separated by a '#'. I'm wanting to read through the file and count the …

Software Development file-system java
Member Avatar for iamthwee
0
115
Member Avatar for muadh jamal

:confused: please some1 can help me in writing a random number generator funtion......generates number from 1-10000...explain it..plz

Software Development c
Member Avatar for WaltP
0
3K
Member Avatar for Senel

I have started to solve them but no use, im a beginner :o with easy solution please,i will be greatful.. I hope that im didn't ask to much. Q1)Write a program that read two integer and determined and prints if the first is a multiple of the second? {Hint: Use …

Software Development c
Member Avatar for Aia
0
1K
Member Avatar for Daniel E

I'm trying to switch from Turbo C++ to MSVC++, I've gotten most of the differences in coding and libraries worked out, though I keep getting this problem and I have tried to find a solution but I haven't been able to find one after 30 minutes of searching for it. …

Software Development c++
Member Avatar for vijayan121
0
119
Member Avatar for RisTar

Im trying to read some integers values from a text file. The problem is that first lines of the text files contains some text and only then theres the values that i want to read into variables , and i dont know how to get down three lines and then …

Software Development c open-source
Member Avatar for RisTar
0
142
Member Avatar for CRD

Is there any place that I can find what functions are available in what headder files? Dick

Software Development c
Member Avatar for CRD
0
72
Member Avatar for jan1024188

hello, I am using Visual Studio 2005. When I write come C++ code (using iostream header) I get this error when compiling c:\users\jan\documents\visual studio 2005\projects\lesso\lesso\main.cpp(1) : fatal error C1083: Cannot open include file: 'ioestream': No such file or directory What should I do?

Software Development c++ visual-studio
Member Avatar for jan1024188
0
120
Member Avatar for adnichols

I have been having difficulty trying to figure out how to read in data backwards. I get the idea, but have no idea how to properly code it since it is string data from a txt file. I was given the basic file to start with, but need to add …

Software Development c++ file-system ios
Member Avatar for adnichols
0
134
Member Avatar for teh_man

Hey All i am making a connect four game. I have done most of the code but need help in some bits 1) Which is how to code to see if there a win from vertical, horizontal or diagonal. - The Grid is 7 by 7. - I no idea …

Software Development c++
Member Avatar for Lerner
0
134
Member Avatar for 7arouf

hi can anyone tell me what do we mean by: system( "PAUSE" ); and system( "CLS" ); in C++ thanks

Software Development c++
Member Avatar for Lance Wassing
0
562
Member Avatar for Caped Sam

Hi, I'm very new to C++ and I am getting the following error when I try to compile: [Linker error] undefined reference to `CSerial::CSerial()' [Linker error] undefined reference to `CSerial::Open(char const*, unsigned long, unsigned long, bool)' [Linker error] undefined reference to `CSerial::~CSerial()' . . . etc. This is the code …

Software Development asp c++
Member Avatar for satish.paluvai
0
380
Member Avatar for desijays

i was just going through some source code and came across the directive [code] #pragma comment( lib, "irrlicht.lib" ); [/code] I got mixed and confusing answers when i read about it in the vc++ documentation. Could someone please explain clearly the purpose or necessity for such code? I do have …

Software Development c++
Member Avatar for desijays
-1
159
Member Avatar for Duki

Hey everyone, this is a big one. The question has asked that I define functions and then write the function main to test the functions I wrote. I keep getting the following error at my first cout in main: error C2679: binary '<<' : no operator found which takes a …

Software Development c++ first-post
Member Avatar for Duki
0
583
Member Avatar for staneja

I was executing a simple core java application using JDK1.5 I wrote code and complied using javac it gave some errors that i fixed and at last it got complied successfully But when i tried to exeute it using java it gave me an error message Error in thread main.NoSuchMethodFound …

Software Development java
Member Avatar for vinod_javas
0
142
Member Avatar for kenjutsuka

[code] void entry(int itemsales1[255][255], int itemcount1, string itemnames1[255]) { int count; char *days[]={"Monday", "Tuesday", "Wednesday", "Thursday", "Friday"}; cout << "Enter item's name: "; cin >> itemnames1[itemcount1]; for (count = 0; count < 5; count++) { cout << "Enter " << days[count] << " sales: "; cin >> itemsales1[itemcount1][count]; } return(itemsales1, …

Software Development c c# c++
Member Avatar for kenjutsuka
0
94
Member Avatar for ntredame

I can't figure out what I have wrong in teh following program. I am trying to count total characters, vowels, and consonants. I have even worked through it with a friend and neither of us can figure it out. The code follows: [code=cplusplus] #include <iostream> #include <string> #include <cstring> using …

Software Development c++
Member Avatar for ntredame
0
4K
Member Avatar for blufab

I am creating a DefaultSingleSelectionModel subclass. Is there anyway to discover what component is the owner of the model from inside the model?

Software Development java
0
58
Member Avatar for Duki

Hey all, I'm doing hw, and I did a desk-check for this program and got completely different answers than that of the computer when the program was put into the compiler. The question says to consider the function `defaultParam` void defaultParam ( int u , int v = 5 , …

Software Development c++
Member Avatar for Duki
0
105
Member Avatar for B.Y

Well, I happened to download Dev C++ on my laptop today ... I jus wrote a simple "Hello World" program .... but when I compile & run ... compilation is successful but the result window flashes & disappears ... Can anybody plz help me with this?????????? Also, how can I …

Software Development c++ ide laptop
Member Avatar for ~s.o.s~
0
96
Member Avatar for jan1024188

Hello, I wanna know if there is any way to make a window transparent using Win32 API Thanks in advance, Jan

Software Development api c++
Member Avatar for jan1024188
0
142
Member Avatar for negbballer54

Hey, I'm writting a program in C that is supposed to be a simple connect four game. I ran into problems when I tried to assign my array connects to a set value. The compiler gave me the error, Invalid indirection. Heres a little bit of the code where the …

Software Development c++
Member Avatar for negbballer54
0
103
Member Avatar for Prog.Learner

[COLOR=#0000ff]Hi folks,[/COLOR] [COLOR=#0000ff]I get this error message on this line when I try to count the amount of characters in a string. I wanted to count the characters so I can manipulate how the output is shown. It tells me no argument is made whereas I feel that the particular …

Software Development c++
Member Avatar for John A
0
248
Member Avatar for ganbree

Ive been writing a DirectX application for some time and there has been a bug that I have been unable to fix, but this is to do wth the Windowsx API. I can run my DirectX application (Fullscreen) fine, but when I Minimise it then restore, fullscreen mode does not …

Software Development api c++
Member Avatar for ganbree
0
211
Member Avatar for debargha

hello, everybody.... i am new to java programming........so my question may be childish i want to ask that.....in java all methods and variables are public... by default(opposite to c++).so why we are writing public static void main(String args[]).main method can be accesed from anywhere even if i dont write public …

Software Development java
Member Avatar for debargha
0
134
Member Avatar for fmlyman

Yes, this is homework. This is my first course in programming and I am having a problem translating what I know I need to do into code. I basically need to write a progam that reads a person's name in the following format: first name, then middle name or initial, …

Software Development c++
Member Avatar for John A
0
127
Member Avatar for scru

I have an event handler for the Leave event of a text box, that checks that the user has entered an invalid value. It displays a message and tells the user that the value entered is wrong. But here's the trouble: after if displays the message, it still allows the …

Software Development
Member Avatar for scru
0
139
Member Avatar for abhinav.sharma

[CODE]#include <iostream> using namespace std; int main() { int a; cout<<"Enter a number"; cin>>a; [B]if(a=5)[/B] { cout<<"Five"; } else { cout<<"Not Five"; } } [/CODE] When I use the assignment, the result is always "five". I understand that a is assiged 5, but there is no statement to check for …

Software Development c++
Member Avatar for abhinav.sharma
0
108
Member Avatar for kartik911

Hi i am a beginner in programming C++ language and am having a bug in the doubly linked list program. The problem is while printing the list in fwd direction the prgm prints the contents just fine. however while trying to print the list in reverse direction nothing gets printed. …

Software Development c++ linked-list
Member Avatar for kartik911
0
138
Member Avatar for SHWOO

Can anyone explain why I am not getting any output from this code [code] int _tmain() { String *sym[] = {S"BA", S"CA", S"MS"}; int shares __gc[] = {25, 100, 30}, price __gc[] = {25, 31, 37}; Random *randomCurVal = new Random(); int purVal, curVal; int totalPurVal = 0, totalCurVal = …

Software Development asp.net c c# c++
0
80
Member Avatar for rowly

Hello guyz i'm trying to write a stack program in C... Push one character onto the stack. Your function should have the prototype: void push(POINTER *Top,stackitem a); 2. Push a string of characters into a stack. Your function should have the prototype: void push_string(POINTER *Top,char *string); Your implementation should make …

Software Development c
Member Avatar for rowly
0
1K
Member Avatar for liz517

This is what I have. I know I am missing something can you help [code = python]import string def main(): print "This program replaces 4 lettter words in a file with xxxx" # get the sequence of words from the file fname = raw_input("File to analyze: ") text = open(fname,'r').read() …

Software Development python
Member Avatar for sneekula
0
124
Member Avatar for muggle_spy

[COLOR=purple][B]I NEED HELP WITH THE 4-QUEENS PROBLEM.:rolleyes: [/B][/COLOR] [B][COLOR=#800080]I HAVE TO BUILD A PROGRAM FOR 4 QUEENS SOLUTION USING C.......:?: [/COLOR][/B] [B][COLOR=#800080]FOR MY DATA STRUCTURE PROJECT.[/COLOR][/B] [B][COLOR=#800080]CAN ANY1 HELP ME WITH THE SOLUTION FOR THIS....... I NEED THE PROGRAM......[/COLOR][/B] [B][COLOR=#800080]THE QUESTION IS THAT: [/COLOR][/B] [B][COLOR=#800080]U HAVE A 4*4 CHESSBOARD. PLACE …

Software Development c data-structure
Member Avatar for muggle_spy
0
148
Member Avatar for afr02hrs

Can anyone spot the semantic error in this triangular number calculator here? It correctly reports 21 as being a triangle number but incorrectly that 15 is not a triangle number. However if you input 15 as the first value entered it correctly says that 15 is a triangle number!! [code] …

Software Development c
Member Avatar for John A
0
156

The End.