132,726 Archived Topics

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

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

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

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

Software Development apache vb.net visual-studio
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 …

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

Software Development python tkinter
Member Avatar for Destray
0
207
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 …

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

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

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

Software Development java
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' …

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

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

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

Software Development java
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: ") …

Software Development python
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 == …

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

Software Development file-system python seo
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): …

Software Development pascal
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 …

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

Software Development web-browser
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 …

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

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

Software Development gui python
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

Could anyone help me with shell script witch is analysing errors on server

Software Development shell-scripting
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] = …

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

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

Software Development listview
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 …

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

Software Development python
Member Avatar for vegaseat
0
125
Member Avatar for saadsaidi

Hello all, A friend of mine developed a program using vb 6 using an "MS Access" database. he used ODBC to connect the users to database over network. The problem is he needs to connect 20+ computers to this program, and all computers are equipped with winxp sp2, that as …

Software Development visual-basic
Member Avatar for vb5prgrmr
0
201
Member Avatar for kenetpascua

I want to create a menu like this Menu List Type - 1 for Bubble Sort 2 for Insertion Sort 3 Selection Sort 4 Stack 5 Queues heres the code of bubble sort [CODE]#include <iostream.h> #include <stdlib.h> const int MAXSIZE = 10; void bubbleSort(int arr[], int size); void swap(int& x, …

Software Development c++
Member Avatar for kenetpascua
0
102
Member Avatar for NHONORE

I d like to have a sample of program written in c++ tht manages student notes transcripts) thanks

Software Development c++
Member Avatar for Ancient Dragon
0
59
Member Avatar for tfmontague

I have a class function - which I am trying to pass array values - however the function returns the values even when I don't use the reference &. WHY? COULD SOMEONE EXPLAIN THIS? [CODE] Block example; // create an instance of the class 'Block' int Array1[3] = {0,0,0}; // …

Software Development c++ linked-list
Member Avatar for alvinwong
0
87
Member Avatar for tinkeydo

The first part inside the "If" statement works perfectly. The only part I am having trouble with is the "else" statement. I was trying to get it to generate an "x" amount of passwords and get those passwords to be at a length defined by the user. The problem is …

Software Development c++
Member Avatar for alvinwong
0
95
Member Avatar for cwarn23

Are there any tutorials on defining a variable so that it can be used for any type. Example the following: [CODE]int main() { var myvariable; myvariable="this is a test"; myvariable=3.141592; myvariable=myvariable*myvariable; return 0; }[/CODE] But I don't know how to make it possible to make the above code possible. It …

Software Development c
Member Avatar for cwarn23
0
134
Member Avatar for bijayswain

I want to put this code into separate window so that the results are displayed in a custom window not in a command prompt [CODE]#include <iostream> #include <string> using namespace std; void main() { system("title Find Mac From IP"); system("cls && Color DF"); cout<<"--------------------------------------------------------------------------------\n"; cout<<" This Utility is designed to …

Software Development c++
Member Avatar for alvinwong
0
110
Member Avatar for ITwoman

Hi please help me How can create login password window for delphi application? Thanks

Software Development delphi pascal
Member Avatar for Mikav6
0
85
Member Avatar for sree22_happy

hai friends i want a project title in j2ee to do my project plz help me :sad:

Software Development java
Member Avatar for peter_budo
0
178
Member Avatar for kadilacgh

Hi am working on a project and am using sql server 2005 express as my database server, the problem is i can;t connect to the sql server from any machine on my local network (windows). Below is my connection string [CODE]con.ConnectionString = "Data Source=webserver1\SQLEXPRESS;AttachDbFilename='C:\POSM_DB.mdf';Integrated Security=True;Connect Timeout=30;User Instance=True;" [/CODE] It works …

Software Development sql vb.net
Member Avatar for sknake
0
188
Member Avatar for BestJewSinceJC

Hey guys, simple question that I don't see anything on in the String.h library and I can't remember from my C class 3 years ago. I have the following declaration: char something[100] = "whatever"; And later in the program I call strncpy. After calling strncpy, at some later point I …

Software Development c
Member Avatar for WaltP
0
94
Member Avatar for joharasad

Hi i m new user in vb.net so i want plz u people help mee, i just want to conect my project to sql server database.

Software Development sql vb.net
Member Avatar for sknake
0
166
Member Avatar for CBLACK10

I'm fairly inexperienced so please bear with me. I am using FlourineFX, my goal is to retrieve data from an amf server. I've got a windows form with a button. The code for a button creates an instance of an object: [code] private void btnGo_Click(object sender, EventArgs e) { ArrayList …

Software Development client-server
Member Avatar for sknake
0
110
Member Avatar for johnGIS

Hi guys please help me learn VB 5. Am very new in this . If anyone can forward me some starter tutorials i would be very grateful

Software Development visual-basic
Member Avatar for abu taher
0
93
Member Avatar for Instinctlol

Can anyone tell me why it loops my menu() twice after i enter the numbers from Add(). I know it has to do something with cin.ignore() but I don't know where to place it so it doesn't loop my Menu() after. [CODE]#include <iostream> #include <string> #include <fstream> using namespace std; …

Software Development c++
Member Avatar for farooq007
0
118
Member Avatar for cwarn23

I have been searching on the web but can't find an answer to this question. How do I make a simple script that will read the functions in a php.net dll file where it can be used in c++. The main reason why I am trying to do this is …

Software Development c++ php
Member Avatar for cwarn23
0
157
Member Avatar for Iz3k34l

I am new to java and trying to figure this out, the error im getting is; week1SR4Frame.java:28: week1SR4Frame is not abstract and does not override abstract method windowDeactivated(java.awt.event.WindowEvent) in java.awt.event.WindowListener public class week1SR4Frame extends JFrame implements WindowListener, ActionListener I am trying to "endButton.addActionListener(this);" i have added the above code also …

Software Development java
Member Avatar for Phaelax
0
148
Member Avatar for johndoe444

Hi, I want to write a log function but I want to implement in the style of fprintf/sprintf style. ie [CODE] fprintf(arg1, template string, template values) write_to_log(template string, some array of ints/double etc to fill the template) [/CODE] I want to implement this variadic function: [CODE] void write_to_log(char template, int …

Software Development c
Member Avatar for Dave Sinkula
0
114
Member Avatar for Kavyashri

I want to create columns in my DataGridView just like that: ______________________________________ |________________Taxes________________| |_______Tax 1_______|______Tax 2______| | 3,50 | 4,50 | | 6,60 | 4,22 | But how do I make column headers with 2 levels, and merge the first row? Thanks.

Software Development c#
Member Avatar for Kavyashri
0
5K
Member Avatar for Thumb2

[code=C++] #include <fstream> using namespace std; void a(ifstream b){} void main() { ifstream b("c.txt"); a(b); // error caused when function a() is used } [/code] Why is this producing an error? Thank you, Thumb2

Software Development c++
Member Avatar for jonsca
0
146

The End.