199,114 Archived Topics
Remove Filter ![]() | |
. 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 … | |
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 … | |
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 … | |
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? | |
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 … | |
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? | |
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 … | |
what is the difference between dynamic array and simple array | |
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 … | |
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 … | |
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 … | |
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"); // … | |
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); … | |
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, | |
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 … | |
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 … | |
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 … | |
>>> 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 | |
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. … | |
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 … | |
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? | |
hi is there a code to auto refresh the page if 503 apache error message appear ? | |
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 … | |
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. | |
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 … | |
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 … | |
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' … | |
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 … | |
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 … | |
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 … | |
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: ") … | |
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 == … | |
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 … | |
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): … | |
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 … | |
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 … | |
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 … | |
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. … | |
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, … | |
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 … | |
Could anyone help me with shell script witch is analysing errors on server | |
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] = … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … |
The End.