199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for cool5_1

. Write a console application to find the maximum number out of N numbers entered by the user. The working order is as follows: 1. The user says I want to give 10 Numbers 2. The program inputs 10 numbers from the user 3. The program displays the largest number …

Member Avatar for Nick Evan
0
248
Member Avatar for mdawaina

hi guys, i am new in this forum, my project is about Quad Tree image compression, the problem is that it does not succeed to encode large images, it works good for my small 8 by 8 image, i work by QT c++ editor, i attached my project with my …

Member Avatar for mdawaina
0
86
Member Avatar for colmcy1

Hey all, I am having trouble with the ""std_lib_facilities.h" header. I am getting the complier message: error C2614: 'String' : illegal member initialization: 'string' is not a base or member I am going through Bjarne Stroustrup's - Programming Principles and Practice Using C++ and he suggests that if you cant …

Member Avatar for xqq524148626
0
312
Member Avatar for jerseycoaster

I have a slew of Java updates on my old Dell laptop, that take up over 1 GB of disk space. Do I need to keep them all? Can I remove the older ones without loss of performance?

Member Avatar for BestJewSinceJC
0
143
Member Avatar for BobFX

Hi, I am learning C#, having a good C background as a programmer. I need to port a C application to C#, but there is a very basic problems that stalls me. My C program has many subroutines, each of them in its own file. They share a common .h …

Member Avatar for BobFX
0
658
Member Avatar for hao90

I am learning the OOP recently and i have a few questions to ask 1) When should i use operator overloading? 2) When should i use template?

Member Avatar for jbennet
0
106
Member Avatar for shack99

Hey, I’m really new to java..so I'm really not sure what some of the errors mean , when I run this program it reads data from the file and all but I can’t get it store new data in a new file, the file “exo” does get created though. Here’s …

Member Avatar for shack99
0
119
Member Avatar for sidra 100
Member Avatar for bilalislamabad
0
79
Member Avatar for ShadyTyrant

Hi there daniweb, im looking for some help. I have two classes MainWindow(wx.Frame), and AddTask(wx.Dialog). MainWindow contains a listbox called task_list. When AddTask is created I want the user to fill out the required info and and then click a button activating an on_click event. In that event I want …

Member Avatar for ShadyTyrant
0
115
Member Avatar for nedsnurb

I wrote this program which takes the value from the user and makes it into a even number if the number entered was odd, if not then print out a message to say they need to enter a odd number. But the program continues to return a value from the …

Member Avatar for bilalislamabad
0
225
Member Avatar for laelzio.mosca

I have this code for a tic tac toe game, everything works fine, but only two player can play, I`d like to make it so the user can enter the number of players, and if there`s only one player, the user can play agains the computer, how do I get …

Member Avatar for nerdinator
0
203
Member Avatar for johndoe444

hi, [CODE] if (CLIENT_HANDLER_THREAD_CREATION_POLICY == POLICY_PRE_CREATE) { int id[NUMTHREADS]; for (int i = 0;i < NUMTHREADS;i++) { int id = i; int status = pthread_create(&client_request_handler_threads[i], NULL, handle_client_requests, &id[i]); } } void* handle_client_requests(void* id) { //printf("server threads spawnd\n"); // create log file thread_id = pthread_self(); sprintf(log_file_name,"t%d.log",thread_id); log_file = fopen(log_file_name, "w"); // …

Member Avatar for ithelp
0
99
Member Avatar for staufa

I've been trying to read characters from the keyboard using 'getchar()' but my code always misses one character. Can anyone tell me why this is [CODE=suntax]#include <stdio.h> #include <stdlib.h> #include <string.h> int main(int argc, char *argv[]) { char string[50]; int i; printf("Enter a string: "); for (i=0; i < strlen(string); …

Member Avatar for cthoes
0
327
Member Avatar for tech291083

Hi, Need some good books for a Linux beginner on the following topics, could anyone please suggest me some good titles based on your experience, Sed & Awk Bash/Shell scripting Thanks a lot,

Member Avatar for tech291083
0
88
Member Avatar for vibe0405

I am trying to build an address book program. It has two options so far, it reads the addresses and prints them. they are accessible through a menu in the main function. Everything works fine but for the address I need more than 1 word, separated by space, so I …

Member Avatar for cthoes
0
2K
Member Avatar for The-IT

Hello, I started learning C yesterday, I came here with lots of experience in python scripting. I created a script that uses a variable in a for-loop, that was defined before the loop its self. I get this error: [code]skilz.c: In function ‘main’: skilz.c:16: error: ‘prog’ undeclared (first use in …

Member Avatar for Dave Sinkula
0
143
Member Avatar for cthoes

below two are same program except i interchange to accept input value ....in the first program i accept first using scanf and the by getchar()...which didnt allow to accept character value . but in the second program i first accept getchar()value and then scanf(). so it works fine but i …

Member Avatar for cthoes
0
101
Member Avatar for WOPR

>>> from os import * >>> a = [] >>> a = listdir('.') >>> f = open(a[0],'r') Traceback (most recent call last): File "<pyshell#4>", line 1, in <module> f = open(a[0],'r') TypeError: an integer is required doesn't work, please help me

Member Avatar for WOPR
0
90
Member Avatar for DGentry

I really see a huge need at our workplace for interactive websites. I want to get to the point of creating websites that can interact with Databases and pull data out as reports as well as input data via a website. I've looked at using Linux Apache and MySQL python. …

Member Avatar for DGentry
0
92
Member Avatar for daeuse

I am trying to get my program to restart if the user enters a y, and terminiate if the user enters n. What am I leaving off here, or what am I typing wrong? code: #include <iostream> using namespace std; int BMICalc(int weight, int height); int main() { int weight …

Member Avatar for jonsca
0
207
Member Avatar for Destray

I'm working with Tkinter and I need to make 600 buttons in a grid of 6x100. Is there a way to produce generic variables by going through a for loop? Or do I have to type all 600?

Member Avatar for Destray
0
207
Member Avatar for fuchsia555
Member Avatar for johndoe444

hi, [CODE]#include <stdio.h> int* get_int() { int arr[100]; arr[0] = 5; printf("arr %p\n",arr); return arr; } int main() { int* p = get_int(); printf("got %p\n",p); return 0; }[/CODE] for the code above I get this warning message: [CODE]test-heap.c: In function ‘int* get_int()’: test-heap.c:5: warning: address of local variable ‘arr’ returned …

Member Avatar for gerard4143
0
265
Member Avatar for BestJewSinceJC

I'm wondering where to find what values system() accepts. For example, I want to list the server's OS type. I already did man system, did not find it very useful. And google is returning a lot but nothing relevant.

Member Avatar for BestJewSinceJC
0
78
Member Avatar for Mitja Bonca

I would like to do a seperated class with a method which will return CustomerID (this will be a select query from db), based on the Costumer`s name which would come into this method (it will come from a form1`s method - from a textBox). I am not sure how …

Member Avatar for DdoubleD
0
126
Member Avatar for HazardTW

I do contract work for a small Wireless ISP in my rural area and am creating a desktop app to keep track of jobs and scheduling. The main part of my app visually is a calendar and in each visible day there will be lists as containers for jobs belonging …

Member Avatar for HazardTW
0
244
Member Avatar for johndoe444

Hi, For the following code segment I am getting segmentation fault: [CODE]#include <stdio.h> #include <string.h> #include <stdlib.h> char* trim(char* str) { // while consecutive ws at the beginning skip int len = strlen(str); int i = 0,j = len-1,k,l = 0; while (str[i] == ' ' || str[i] == '\t' …

Member Avatar for johndoe444
0
93
Member Avatar for johndoe444

Hi, I am trying to do meet these 2 requirements: 1. create a global file containing global variables that can be accessed from multiple places. Need this for multithreading. something like global.c/h to contain global data in particular the mutexes. 2. some list modules that is required from different other …

Member Avatar for johndoe444
0
172
Member Avatar for iammfa

Hi, At the moment, I try to practicing c++ with directx, I found good tutorials for that, I started with "Tutorial 1: Create a Window" in this link: [URL="http://www.two-kings.de/tutorials/dxgraphics/dxgraphics01.html"]http://www.two-kings.de/tutorials/dxgraphics/dxgraphics01.html[/URL] I do all steps ok like the tutorial, but when i compile it gave me errors, I'm using VC++ 2008 express …

Member Avatar for iammfa
0
152
Member Avatar for kiranpvsr

Hello everyone, Can anyone tell me how to create the hierarchial structure of replies to a particular message using Java. In most of the Internet Forums, you will find that when you click on a message, the replies to it will be shown in a hierarchial manner based on the …

Member Avatar for kiranpvsr
0
76
Member Avatar for monstercameron

need help correcting! first day,first 2 hours, first python program,(only had a little dark basic) [CODE]active="on" def ondamenu(): print "" print "enter integer 1 or 2" print "" print "opt.1 find the circumference" print "opt.2 find the radius" print "opt.3 quit calculator.py" print "" return input ("enter your choice: ") …

Member Avatar for woooee
0
153
Member Avatar for Spiderpig085

im having major issues saving my TicTacToe game in C++. it is mainly in the function to save the game.. im not sure also if the code is calling that function properly. il show the code.......: [CODE] { char save_or_not; cout<<"Would you like to save the game?"<<endl; cin>>save_or_not; if(save_or_not == …

Member Avatar for mrnutty
0
983
Member Avatar for harpalss

hi there got a couple of probs, say in my text file i have: abase abased abasement abasements abases -------- This coding below is meant to find a word in a file and print all the lines to the end of the file. But it doesnt, it only prints out …

Member Avatar for d5e5
0
133
Member Avatar for Petrica7

Hi. Sorry for my english... I hope this is the correct forum to post this. If not, sorry in advance. I'm trying to make a setup that will choose automatically the language (at start) depending on the result of GetUILanguage. I made this function in (code) section: Function SetLanguageFile(Param: String): …

Member Avatar for FlamingClaw
0
1K
Member Avatar for Fire_Michel

i am connecting mirochip to serial com232 i am sending from the pc to micro controler then the micro controller send back that he recieve so the pc send the next word how to wait the incoming serial data and how to define the timeout(for example 10 second) thanks at …

Member Avatar for Fire_Michel
0
109
Member Avatar for gamer1225

I want to have 2 webbrowser controls and 1 button. With the 2nd webbrowser control always showing whatever is being displayed in the 1st webbrowser control. For example, if I click a link in the 1st webbrowser, the new content showing in this control should also refreshed on the 2nd …

Member Avatar for gamer1225
0
116
Member Avatar for Meinsamr

Create New instance of a class, but use a variable value as name..Possible? And yes, I've searched everywhere, but haven't found any useful. So i'll start by asking here. example code.. Error message: A local variable named 'className' cannot be declared in this scope because it would give a different …

Member Avatar for ddanbe
0
187
Member Avatar for Rombosia

Hi, I have a C++ dll with a header having the following struct: [CODE] struct TData { DWORD m_Command; BYTE m_Option; char m_Message[300]; }; [/CODE] The dll also has a callback function MessageReceived that takes TData as a parameter. The function fills in the m_Message with some data and returns. …

Member Avatar for selvaganapathy
0
1K
Member Avatar for Indran

Hi Gentlemen, I have an error, which was non existant when i used wxpython 2.8.7.1. When i upgraded to 2.8.10.1, basically the GUI got messed up.I am using Python 2.52 environment. The error seems to be from the fact that the parent, in this case MyFrame(wx.aui.AuiMDIParentFrame), is the default frame, …

Member Avatar for snippsat
0
329
Member Avatar for saintrenz

Can you guys check my work i want to perfect my studies at school.. this will be passed on sunday also there some that dont have answer which you know please do tell.. [QUOTE]False 1. When you go through a list of names, from beginning to end, until you reach …

Member Avatar for ryoumah03
0
204
Member Avatar for dimitar.dk
Member Avatar for JeoSaurus
0
141
Member Avatar for suho

I have a map of pointers to objects, i want to delete some randomly chosen pointers and the objects they point to. Is it possible to do it without using libraries like boost ? I assign the map as follows [CODE]map<int,particle*> particle_map; particle* particles= new particle[number_of_particles]; for(i==0;i<number_of_particles;i++) { particle_map[i] = …

Member Avatar for suho
0
116
Member Avatar for stanmore88

Hi, I'm trying to read from an Arraylist in C#, I have the following code: [CODE]for (int i = 0; i < arraySize; i++) { string arrayListInput = inputArrayList[i]; .... } [/CODE] basically I want to read every line from the arraylist to do some computations but apparently the contents …

Member Avatar for sknake
0
94
Member Avatar for Mitja Bonca

This is how I have a listView:[URL="http://img200.imageshack.us/img200/2497/clistview03.jpg"] PICTURE[/URL] For example, I have clicked on the 6th row (which is colored blue) and with a double click I want to insert "SomeName" into a 2nd column (called 1.rezervacija) beside the 9:30. How to do it so? I need something else, with …

Member Avatar for DdoubleD
0
194
Member Avatar for luliana

hi ..pleas any one can help me to write aprogram that allows the user to enter the last names of 5 candidates in a local election and the number of votes received by each candidate, the program should then out put each candidates name the number of vote percentage of …

Member Avatar for luliana
0
84
Member Avatar for punter999

hello, i am new to python and i want to do development in python now. my problem is that: tell me what should be install in the system to start python development? tell me which is the best editor that can help to edit and run python code efficiently? tell …

Member Avatar for vegaseat
0
125
Member Avatar for Phaelax

Hopefully, I explain this well enough. If I know the width of a container, how could I determine how many line breaks are needed to fit a given string within that space? Given a string of N-length, if it needs to wrap beyond a 3rd line, then I want to …

Member Avatar for me655321
0
112
Member Avatar for sanjaypandit

hi 2 all , i have a problem in search according time period, my table name "stats" have field id(int), ip(var char), counter(int),add_date(date time) now i want a search on following ways 1. i want to show sum of counter according weekly >>>means weekly stats of counter 2. i want …

Member Avatar for sanjaypandit
0
115
Member Avatar for solway

Hi guys First time posting here. Have been enjoying all the resources available to us, very helpful. My problem: Recently started learning css / java - i have a web page with an iframe on the index pages within a div tag, which then loads all other pages into this …

Member Avatar for Gianni^^
0
285
Member Avatar for jonnod123

Hi all, I need some general advice with a webform using an Access 2007 database backend. (Hope this is the right place to post this, my problem seems to cross between several possible forums.) I've written a ASP.NET webform (using c#) which captures data and sticks it into an Access …

Member Avatar for militarymodern
0
110

The End.