132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for jeffpro

hey guys, I need this Var1 = 0; Sleep(500); Var1 = 1; My problem is that the Sleep makes all my threads sleep. I want only the one thread I'm in sleep. Thanks, Jeff

Software Development c++
Member Avatar for chiwawa10
0
119
Member Avatar for prasanthsagar

I have an array with some integers. i want to remove redudants integers in the array and print the integers without redudancy... can any one give me the code please.....

Software Development c
Member Avatar for N1GHTS
0
313
Member Avatar for burcin erek

hello it is easy program but there is a mistake in void application while printing the birthday, pt pointer gives a mistake why? [CODE]#include <cstdlib> #include <iostream> #include <conio.h> using namespace std; struct Date { int day; int month; int year; }; void printdate(Date* pt) { cout << "\nbirthday= "<<*pt->day<<"."<<*pt->month<<"."<<*pt->year; …

Software Development c++
Member Avatar for burcin erek
0
112
Member Avatar for rgutierrez1014

Hey everyone, So in a few of my programs, when I have the user enter input, which then gets stored in a list, there seems to be some error. I use a while loop to allow for continuous input, like [CODE] while (!cin.eof()) { cin >> value; list.insert(value); } [/CODE] …

Software Development c++
Member Avatar for chiwawa10
0
109
Member Avatar for Jennifer84

Hi, I have a problem with a random number generating function. This function works great on windows XP but when I run the function in Windows VISTA and Windows 7, I receive an error message that displays: [B]"Attempted to read or write protected memory. This is often an indication that …

Software Development c++ windows-vista
Member Avatar for Milton Neal
0
317
Member Avatar for kkjava

Hi All, Really appreciate your help!!! I am new to java and this is my new project in java. for my application am trying to get DB results by calling a oracle procedure through JDBC.i was able to do that and was getting results back to the DAO class.am setting …

Software Development java oracle
Member Avatar for kkjava
0
159
Member Avatar for sixdegreesunder

Hi all, I'm new in programing.I'm trying to assign random numbers which math.random will choose.Each time I run program Math.random must choose either 50,100 or 150 ie: 50*1 for 1, 50*2 for 2, 50*3 for 3. I hope my explanation makes sense. Thank you! [CODE] int width; width = (int)(Math.random() …

Software Development java
Member Avatar for sixdegreesunder
0
168
Member Avatar for Intrevix

Hello, I just started a computer science course and I'm having issues with one of the assignments. I think for the most part, I've got it done correctly (although, I'm a little shaky with the if/else if statements), but I'm having a syntax problem on lines 15 and 19 ("illegal …

Software Development java
Member Avatar for adams161
0
181
Member Avatar for jtylerboy222

Creating a program with a circle class that has 3 private variables and 3 public functions and then have accessor & mutator functions. I know this isn't right, but I've gone through the book and my notes and I feel like I've mixed up a few ways of doing it …

Software Development c++
Member Avatar for jtylerboy222
0
105
Member Avatar for pmark019

[QUOTE]I am trying to make my program look like the image I attached but I don't know how to. I can't make the JTextFields positioned like that.[/QUOTE] [QUOTE]I also want to make it a JScrollPane instead of JPanel[/QUOTE] [CODE]import java.awt.*; import javax.swing.*; import java.text.NumberFormat; import javax.swing.JFormattedTextField; import java.awt.event.*; import java.text.*; …

Software Development java java-swing
Member Avatar for NormR1
0
109
Member Avatar for Suzie999

Hi all. I recently began to give C++ a go again after failing on the first attempt. I quickly ran into the same problem that led me to C# the first time around. Strings, damn strings. I simply cannot get my head around arrays of charactors, they stress me out, …

Software Development c++
Member Avatar for Suzie999
0
124
Member Avatar for wiggerboi95

hey everyone, i am a new developer using the bluej IDE on mac 10.6. Whenever i use the virtual terminal to execute, it works perfectly. the other day, i attempted to export the file to a JAR file through the programs basic functionality, as JAR files are natively run on …

Software Development ide java
Member Avatar for NormR1
0
235
Member Avatar for parrishnewbie

Hi everyone, I was wondering if anyone could help me figure out this issue I am having with a program I have written. The problem is after you type in the number of days you want to rent the car for if it is less than 0 or greater than …

Software Development c++
Member Avatar for restrictment
0
951
Member Avatar for sss33

A file called input. john 9 7 6 7 4 3 9 5(double space)76 54 53 77 65(double space)4 45 45 def main(): fin = open ("input", "r") line = fin.readline() x = line.split(" ") a= (int (x [1])+ int (x [2]) +int (x [3])+ int (x [4]) +int (x …

Software Development python
Member Avatar for cghtkh
0
137
Member Avatar for NewLegend

Hello I use 2 linked list ===> Doctor ===>student the First doctor A, has three students Student_1, Student_2 and Student_3. the second doctor B, has one students Student_4. the Third doctor C, has one students Student_5. to linked student, i using this function: [CODE] Doctor * Doct; student *st1, *st2; …

Software Development c++ linked-list
Member Avatar for NewLegend
0
85
Member Avatar for kakaliki

Stuck in this question .I cant spot where i am doing the mistake. Can somebody help me please. thanks. this is the question: ----------------------------------------------- The number of combinations (C) from M items taken N at a time is given by C= fac(M) / [fac(N) * fac (M – N)] where …

Software Development c++
Member Avatar for kakaliki
0
208
Member Avatar for Nathaniel10

I am doing an exercise from Stroustrup's book. It is the drill from chapter 10 on input and output streams. The program I wrote compiles but crashes when it reaches the prompt for the output file name. My IDE (VC++ Express) simply says there is an unhandled exception yielding a …

Software Development c++ file-stream ide
Member Avatar for Nathaniel10
0
157
Member Avatar for gozlemci

Hi there; I hope I post this message in true place.My question is about modules in oop. In Code complete, author Mr Steve McConnell mentioned "module" in page 89. [QUOTE] Semantic coupling The most insidious kind of coupling occurs when one module makes use not of some syntactic element of …

Software Development c++
Member Avatar for gozlemci
0
2K
Member Avatar for boos800

I'm beginning a program that needs to read a file given in the command line. My first question is, if my command line looks like: $java mysimulator 5 proc.txt And I want to use proc.txt, which args[i] is it? Right now I'm assuming that the class name is args[0] and …

Software Development file-system java
Member Avatar for boos800
0
4K
Member Avatar for asian_al

I need to write a tic tac toe game that displays who's turn it is. It doesnt have to restart or have AI. Im not sure why everytime i click it repaints a different colors. I want every cell to be one solid color then depending on if its X's …

Software Development java java-swing
Member Avatar for NormR1
0
106
Member Avatar for lamtupa

Dear friends, I get a assigment and i very confused with this cases. How to write a function that computes the area of an arbitrary polygon – so not necessarily a triangle or rectangle, etc. The input of the function should be a list of points, where each point is …

Software Development algorithm python
Member Avatar for TrustyTony
0
207
Member Avatar for daviddoria

Can anyone explain why the last line works? It seems like it is trying to cast a CRectangle as a CTriangle (which I imagine should fail?) but it outputs "5" as the function should. [code] // virtual members #include <iostream> using namespace std; class CPolygon { protected: int width, height; …

Software Development c++
Member Avatar for mitrmkar
0
119
Member Avatar for sims6785

Hi, I am using vb.net 2008 with MySQL for my project. I have a datagridview on my form which displays records from Mysql table on form load. i want to delete the selected row in datagrid from table on 'row header mouse click' event. The 2 different codes that i …

Software Development mysql vb.net
Member Avatar for lolafuertes
0
620
Member Avatar for drogba123

Hi guys, i am trying to implement elevator simulation but stuck in some ways. 1st. i would like to set the background of my elevator class area into yellow but when i tried to do so by typing app.setBackground(COLOR.YELLOW) under class Elevator, i unable to change it. 2nd. i tried …

Software Development gui java java-swing
Member Avatar for drogba123
0
903
Member Avatar for badboy11

Hi All, I am coming from C++ world and working on some C# code. Currently working on a class with an ArrayList data member and would like to control which methods/behaviours get exposed to the client of this class. One of the functions in this class takes an index as …

Software Development c c# c++
Member Avatar for badboy11
0
172
Member Avatar for zachattack05

Ok...I spent hours (I know, probably something you pros know already) trying to figure this out. I finally did and thought I would share it with others considering I found nothing (literally) out there on this. Feedback would be much appreciated! Most of the time string data written to a …

Software Development file-stream file-system open-source
Member Avatar for zachattack05
0
676
Member Avatar for faisal6621

How could i simulate the SJF(Shortest Job First) CPU Scheduling in Java?

Software Development java
Member Avatar for faisal6621
0
154
Member Avatar for mahaboob Basha

Hi iam developing one application..in which i need to write code with port number and mobileno which shoul send a sms message to mobile.. here i connected my gprs mobile as a modem to my pc in nowsms gateay... now i want to write a program which should listen on …

Software Development java
Member Avatar for sandeepsrikanth
0
359
Member Avatar for niketh90

Can anyone provide me with a small code to [B]retrieve[/B] value either from [B]oracle 10G XE[/B] database or [B]MySql[/B] database using Java applets....... I searchd the whole internet but none worked fine for me.. Regardds Niks

Software Development java mysql oracle
Member Avatar for niketh90
0
90
Member Avatar for DeShadow

Where can I find the best tutorial for teaching myself all there is to know about programming in C++? I have no money to spend on it and I am extremely new to programming (haven't written a program since BASIC, if you can count that). Any information you can provide …

Software Development c++
Member Avatar for Stefano Mtangoo
0
110
Member Avatar for mainstreetmark

I'm doing my first C project in, maybe, 15 years, and have gotten stuck. I'm trying to link a 3rd party library into my project. I've installed the headers in ./include/ft and the libs in ./lib/ft Here's my compiler command and associated output: [icode] [root@wayne tele]# g++ -g lib/ft/libmbusmaster.a -lm …

Software Development c
Member Avatar for mainstreetmark
0
305
Member Avatar for Sunshineserene

Hi, I have a problem with my instance. I need to do a file read to extract all the numbers in the text file. However, when reading the file, I used String, and hence the file is read as a String. Later on I need to equate the output of …

Software Development java
Member Avatar for vasu d
0
428
Member Avatar for nolife

error LNK2019: unresolved external symbol hi everybody i'm working under visualstudio2005 and i create a new namespase with some fonction ; after i have another class in a different file and when i call myfonction og my namespace i have this erreurs error LNK2019: unresolved external symbol "void __cdecl mynamespace::myfonction() …

Software Development c++
Member Avatar for nolife
0
1K
Member Avatar for LianaN

Hi guys! I'm trying to access a remote database (MySQL) that is installed on my home computer. The code is: [CODE] public void initDB(String ipaddress, String databasename, String login, String pass) { try { Class.forName("com.mysql.jdbc.Driver"); db = (Connection) DriverManager.getConnection("jdbc:mysql://" + ipaddress + "/" + databasename, login, pass); statement = (Statement) …

Software Development java mysql
Member Avatar for LianaN
0
4K
Member Avatar for Roelof Wobben

hello I have this programm [code] class zoeken() : pass def __len__(self): return 0 def __str__(self): return test2 def find(self, strng="", ch="", start=0, stop=0): index = start while index < len(strng) and index < stop: if strng[index] == ch: return index index += 1 return -1 test = zoeken() test.woord …

Software Development python
Member Avatar for snippsat
0
122
Member Avatar for cdh1944

[ATTACH]17390[/ATTACH] I've no idea how to solve this Q with C. help me~~ plz~~!!

Software Development c++
Member Avatar for Stefano Mtangoo
0
172
Member Avatar for cristey

Hi! Good day, I am new here and I want to ask several questions about making graphs in vb6. I am working now on a project which gather samples from a remote sensor and transfer the data via SMS. My problem is I am a novice programmer specially dealing with …

Software Development visual-basic
Member Avatar for debasisdas
0
105
Member Avatar for bettersaid

someone knows how to launch an app in mac?? [CODE] import os class LaunchApp: def launch(self): os.startfile("/Applications/QuickTime Player.app") s = LaunchApp() s.launch()[/CODE] this code works on windows and [CODE]os.system('gnome-open ' + /path)[/CODE] on linux but in mac, it returns this error "AttributeError: 'module' object has no attribute 'startfile'"

Software Development operating-system python
Member Avatar for nathan099
0
1K
Member Avatar for kchadek

Hi, I'm brand new to the forum and am taking an intro to Java class and need tome help. I have never programmed before so go easy on me, lol. The problem is to get the exact change from a dollar amount that a user inputs. Example: $4.23 is 3 …

Software Development java
Member Avatar for kvass
0
2K
Member Avatar for Kasanda

Hi,i have a java assignment that prints out the number of occrances of words in an entere sentence by the user.

Software Development java
Member Avatar for Jawahar prabhu
0
147
Member Avatar for challarao

Hi! I have written a function for passing a string into it and finding its length. When I pass a string it prints a correct value. But when I take two strings and passing them individual len(str1),len(str2) after scanning two strings it returns the wrong value. In the first case …

Software Development c
Member Avatar for Banfa
0
112
Member Avatar for ftl25

Hi, How do I check if a member of a struct is null? I've tried: [CODE]if(ErrorInfo->TestName != NULL)[/CODE] The above method returns true even when [B]ErrorInfo->TestName[/B] contains nothing (debug shows it as 0xccccccc, ""). [CODE](!(strcspn(ErrorInfo->TestName, "") == 0))[/CODE] The above method throws an access violation. I've tried other ways too …

Software Development c++ data-structure
Member Avatar for ftl25
0
10K
Member Avatar for swathys

Hi, Can anyone help on my code. i'm not sure whether i'm code in right way or not. I would like to do 1) read total value from a particular table in 2 database (MyAccount & DealerAccount)from the most recent transaction 2) read grandtotal from another database from the most …

Software Development vb.net
Member Avatar for swathys
0
93
Member Avatar for fourty

Hi guys I need a code that outputs the save as Dialog box. Just as simmple as that. Thanks.

Software Development visual-basic
Member Avatar for AndreRet
0
136
Member Avatar for badllama

Okay, I’ve got a noob question. It’s been awhile since I coded so I thought I’d start off at the beginning and create a template list and tree. Back in the old days I left the nodes open, but I wanted to keep the data private this time. My first …

Software Development c++ queue visual-studio
Member Avatar for Valaraukar
0
229
Member Avatar for tongdl04

Hello, I am a newbie in C++ programming. I try to write a C++ program to first read and split a hugh text file (that containing multiple small files inside it) into multiple small text files, then I need to write the first line of each small text file into …

Software Development c++ ios
Member Avatar for tongdl04
0
560
Member Avatar for homeryansta

[CODE=cpp]void BOARD_Unselect_All(System::Windows::Forms::Form^ Frm) { Frm.a1->BackgroundImage = Image::FromFile("elephant_pla.gif"); }[/CODE] a1 is a picturebox from the form. How do you use the buttons, picturebox, etc from the form being passed in?

Software Development c++
Member Avatar for Milton Neal
0
202
Member Avatar for Ghost34

how can i make a random number not to always appear every time i open the program my code always prints or present same number every time i open and terminate and open it again and again it always shows same number but if i click a button for random …

Software Development visual-basic
Member Avatar for AndreRet
0
122
Member Avatar for acrocephalus

Hello! I have a table with some rows and cells (code at the end), and created a function which searches for text inside the cells and returns the row number where the text is (to simplify the example, only English Name is working). Then, it should set the grid cursor …

Software Development python
Member Avatar for acrocephalus
0
161
Member Avatar for mrthomasbkk

Hello, i need help please, i need to create an trigger in ms access 2007, probably by vb code, but don't know how. The issue: i created a database in ms access 2007 and i need to make an time trigger to show every time when opening the database (it …

Software Development visual-basic
Member Avatar for AndreRet
0
247

The End.