132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for timbomo

i get this error and idk know y anyone know wat i gotta fix [CODE]int main () { int total_score, print_score, action, whose_turn, go_again; cout << "Race to 100 " << endl; total_score = score_num(int &ns1,int &ns2,int &ns3, int &ns4, int &ns5, int &n6, char gam_answ); print_score= display_score(int curr_score); action= …

Software Development c++
Member Avatar for Nick Evan
0
171
Member Avatar for jessicacarl
Member Avatar for Nick Evan
0
91
Member Avatar for VernonDozier

I have some code that works. However, when I try to make it not work (i.e. try to execute a non-existent program), I don't see any indication that it hasn't worked. Here's the code snippet. [code=C] pid_t pid; // char *const paramList[] = {"/usr/threshold/bin/preconfig.sh", options[indexSelected].optionName, NULL}; const char* paramList[] = …

Software Development c
Member Avatar for VernonDozier
0
7K
Member Avatar for eulogy57

Hi. I've been browsing this forum for answers for some time now and i guess it's about time to post a question myself. Here's the deal: I have a dll file in which i define a method that sets SE_DEBUG_NAME to enabled. Here's the code: [CODE] // tema4dll.cpp : Defines …

Software Development c c# c++
Member Avatar for eulogy57
0
464
Member Avatar for pirateninja1111

here are the instructions for my assignment Write a program that counts the number of words, lines and total characters (not including whitespace) in a paper, assuming that consecutive words are separated either by white space or end-of-line characters. Your output from this particular file should say: line count: 58 …

Software Development java
Member Avatar for james.newell
0
456
Member Avatar for pn2bade

So I need to make this program that Reads a file with a scanner, inserts each key and value into a hashmap, and when the user types in one of those keys, it will print both the key and the value. If it has no value, it says so, and …

Software Development java
Member Avatar for james.newell
0
98
Member Avatar for priyankapandey

[QUOTE]Hi all... can anyone explain how i can read from a config file and retrieve its value in a cpp file... I am writing down the cfg file...[/QUOTE] [CODE]<APM> [APM_SAYHELLO] Formatter.Type = String Formatter.Val = AtlLogPlainTextFormatter Filter.Type = String Filter.Val = LEVEL_DDEBUG ComponentLevelFilter.Type = String ComponentLevelFilter.Val = true ComponentsEnabled.Type = …

Software Development c++ file-system
Member Avatar for priyankapandey
0
307
Member Avatar for PinoyDev

Good day guys. I want want a little help of my query. The tbl_ entity: tbl_1(UserId(AutoNum ber - set as primary key),Validity(Date/Time)) [code=vb] dim logonid as long rs.open "SELECT * FROM tbl_1 WHERE UserId='" & logonid & "'",conn, adopenkeyset,adlockoptimistic [/code] It returns an error invalid data type expression. But when …

Software Development visual-basic
Member Avatar for PinoyDev
0
105
Member Avatar for fuggles

It compiles without any errors in Eclipse, and when I comment it out, the application does not crash, but somewhere in here it is making my application crash on startup. Does anyone know how to fix this problem? [code=Java] Button send_button = (Button)findViewById(R.id.SendButton); spam_button.setOnClickListener((OnClickListener) this); phone_number = (TextView)findViewById(R.id.ph_num); txt_body = …

Software Development android java
Member Avatar for fuggles
0
85
Member Avatar for kelvinteh

Hi, I have this problem which I do not know how to solve in VB. I have to read from a text file, but only write selective lines to a new txt file. E.g. (original text file) ============================================ SINNWSQ .SINFMSQ 230606 SSM LT 23MAR00323C108 NEW SQ 3328 01NOV04 31DEC20 2 …

Software Development visual-basic
Member Avatar for vb5prgrmr
0
121
Member Avatar for ddanbe

I start a new WindowsApp with Form1 with a Button. Added a form Form2 to my project. In the click event handler of my button I do the following: [CODE=csharp] private void button1_Click(object sender, EventArgs e) { Form2 F = new Form2(); Point P = new Point(500, 500); F.Location = …

Software Development
Member Avatar for chad701
0
251
Member Avatar for shusshoku

I'm using python for a project and was curious if anyone knew whether it was possible to open up jpg files in a GraphWin window. Also, the image software I'm using with it is PIL, if that helps.

Software Development python
Member Avatar for bumsfeld
0
75
Member Avatar for hag++

Quick question. I have a program that will run perfectly fine in the Debug version (Using MS VS 6) but when I set it to Release and build it, then set the command line arguments (or run it from the comman line) it blows up. Any ideas why this would …

Software Development c++
Member Avatar for mrnutty
0
264
Member Avatar for NotSneaky

Hi I am working on this game. I really never played it so I just read about it. I am getting three errors. I was hoping you guys can help me fix it? Thank you Error 1 error C2059: syntax error : 'do' 2008\projects\program9\program9\craps.cpp 36 Program9 Error 2 error C2143: …

Software Development c c# c++
Member Avatar for NotSneaky
0
213
Member Avatar for bumsfeld

[code]#Blast workbench using biopython from Bio.Blast import NCBIWWW ##result_handle = NCBIWWW.qblast("blastn", "nr", "8332116") fasta_string = "AATTCAGTGGCAAAAAAAAAACTCAAATTTTAGGGAAGGCCCTAATATTATCAAATAATTAGAGGGGGGG" result_handle = NCBIWWW.qblast("blastn", "nt", fasta_string) save_file = open("my_blast.xml", "w") save_file.write(result_handle.read()) save_file.close() result_handle.close() result_handle = open("my_blast.xml") from Bio.Blast import NCBIXML for record in NCBIXML.parse(open("my_blast.xml")) : #We want to ignore any queries with no search results: …

Software Development gui python xml
0
333
Member Avatar for formulajake88

Hello everyone! I'm a beginner in C programming, and am writing code that is supposed to read in all the data from a formatted file, parse it into useful values, and then manipulate these values. However, I'm stuck on the the parsing part. I'm relying heavily on pointers, which I'm …

Software Development c unix
Member Avatar for jephthah
0
510
Member Avatar for BruceIrvin

EDIT: Nevermind, I already found what was wrong; But I can't draw a card properly when I run it still. [CODE]import java.util.Scanner; import java.util.InputMismatchException; public class CardDealer //Main Class { public static void main(String[] args) { Scanner keybd = new Scanner(System.in); Deck deck1 = new Deck(true); int count = 0; …

Software Development java
0
90
Member Avatar for fyp

Hi, I'm having problem with "WriteLine". What I'm tryin to do is write into the selected txt file(from openFileDialog) when user type something in the textBox. ****************************************************** My output is something wrong. For example: when I type "testing" in the textBox, what I see in my text file is as …

Software Development c++
Member Avatar for jonsca
0
101
Member Avatar for xfrolox

Well i got my codes so Checkbox and Textbox to read ini but i cant find how to make ListBox read ini like each line in the ini is 1 item on the listbox i have the api calls thingy and other stuff, but if you have a code or …

Software Development api vb.net
Member Avatar for xfrolox
0
139
Member Avatar for funjoke88

The application will ask questions like: What comes after D? A child is expected to answer the question and the application will inform the child if the answer is correct or wrong. The application will ask a total of 20 questions. After all 20 questions have been answered, the application …

Software Development gui java
Member Avatar for javaAddict
0
131
Member Avatar for paradiseis

here i attached my question ... and i have done the first part and i stuck in the logic part ,can anybody help

Software Development gui java
Member Avatar for javaAddict
0
141
Member Avatar for MTW1989

Here is the entire code; [CODE] #include <iostream> #include <sstream> #include <cstdlib> using namespace std; const int MIN_SCORE = 0; const int MAX_SCORE = 300; const int numofgamesinseries = 3; const int numofplayersonteam = 4; void printintromessage (); void getUserInput(char& Y); int getInt(const string &, int minValid, int maxValid); typedef …

Software Development c++
Member Avatar for Fbody
0
116
Member Avatar for 1bh

So i overloaded the operator < and tried to reuse this by just returning the complement of it for the > comparison operator. I have been stuck at this error tho.. error C2679: binary '>' : no operator found which takes a right-hand operand of type 'const Customer' (or there …

Software Development c++
Member Avatar for 1bh
0
166
Member Avatar for Violet_82

Hi guys, I have just written 2 versions of this simple program: [CODE]#include <iostream> using std::cin; using std::cout; int main () { cout << "This program counts from 10 to 0. \nGuess the missing number.\n"; int n; int f; for (n=10; n>0; n--) { if (n==5) continue; cout << n …

Software Development c++
Member Avatar for Violet_82
0
142
Member Avatar for gorgey506

[CODE]// A personalized adventure #include <iostream> #include <string> #include <iostream> #include <string> using std::cout; using std::cin; using std::endl; using std::string; using namespace std; int main() { cout << "\tGame Designer's Network\n"; int security = 0; string username; cout << "\nUsername: "; cin >> username; string password; cout << "Password: "; …

Software Development c++
Member Avatar for gorgey506
0
179
Member Avatar for dolkk

Hi guys, I am a [COLOR="red"]newbie[/COLOR] in writing programs in assembly language. Can anyone teach me how to write a simple code to develop a basic graphic user interface. I am currently working on a project to create a musical game that requires user interaction. Your assistance is greatly appreciated. …

Software Development assembly user-interface
Member Avatar for DENE@DANI
0
140
Member Avatar for DaveTran

Call me anal but [CODE] return NewMouse.LeftButton == ButtonState.Pressed && OldMouse.LeftButton == ButtonState.Released; [/CODE] on one line doesn't look right and isn't very readable. If I have a line of code that has multiple logic operators, how should it be formatted? For example Should return statement1 && statement2 && statement3 …

Software Development
Member Avatar for DaveTran
0
93
Member Avatar for sarsekim

Hello, I am having some trouble debugging a simple windows forms application. I have four textboxes, two being readonly that display the calculated answers, and then a "calculate" button. here is the code for the calculate button: [code] private void btnCalculate_Click(object sender, EventArgs e) { decimal obj_height = Convert.ToDecimal(txtHeight.Text); decimal …

Software Development c c# c++ visual-studio
Member Avatar for ddanbe
0
150
Member Avatar for timbomo

i want this code to do the action, which is generate a random number 1-6. i am totally lost here ive been looking at examples and this is what i have. i get the error function def is not allow here before "{" token. [CODE]void roll_hold( char remark) { if(remark=='r') …

Software Development c++
Member Avatar for Fbody
0
297
Member Avatar for Bigfoot73

I'm writing a program that requires the user to select a file when the program starts. If he cancel this the program exits. Currently I'm creating an OpenFileDialog in the main form's constructor, but it's not working very well due to the following issues: * If the user cancels I …

Software Development
Member Avatar for Bigfoot73
0
163
Member Avatar for Bigfoot73

I have a problem with inheritance. I have the class A with functions x and y Class B is a subclass of A and should override y. y should call y in A and add extra functionality. Class C is a subclass of B and should override y. y should …

Software Development
Member Avatar for Bigfoot73
0
125
Member Avatar for Yggdrasil

During a university project, I had to print some int arrays to the screen, and I wanted to do it with printf. So I decided to include a function that converts an integer array into a string type, and passes the string out to the calling function. But the function …

Software Development c
Member Avatar for jephthah
0
171
Member Avatar for spursfan2110

This isn't entirely a programming problem, but it may be at its base, which is why I'm bringing it to you guys. For my assignment, I have download a .txt file from my prof's webpage, and then have my program open it. The file, when opened in a web browser, …

Software Development c file-stream visual-studio web-browser
Member Avatar for spursfan2110
0
113
Member Avatar for jiten_raulo

Hi experts, I have confusion about the point I read in my book: I. In a source file you can define number of classes, but only one of them can be a public class. In this case, the name of source file must match the name of public class. II. …

Software Development java
Member Avatar for jiten_raulo
0
89
Member Avatar for jk451

I wonder if at least according to ECMA-334, section 15.9.5, the behaviour of following is undefined: [code] using System; class FindingCountry { public static void Main(String[] args) { int a=0; try { throw new ArgumentNullException((5 / a).ToString()); } catch (DivideByZeroException) { } } } [/code] Running it with the VS …

Software Development
Member Avatar for jk451
0
178
Member Avatar for tennis

in c++ primer " [CODE]void reset(int *ip) { *ip = 0; ip = 0; }[/CODE] After a call to reset, the argument is unchanged but the object to which the argument points will be 0:" I understand that the argument is unchanged, but why the object to which the argument …

Software Development c++
Member Avatar for Fbody
0
107
Member Avatar for tones1986

Hey Guys - i am really new to Java and am having some serious problems trying to figure out how to use the painting stuff. My problem i am trying to get to work is that i need to create a 'circle' by using lines from X number of points. …

Software Development java
Member Avatar for Ezzaral
0
451
Member Avatar for javarook

so this program takes an input file and computes the class average and lists the students who are below average and the students with the highest score. Heres what im having trouble with: Having trouble getting the proper for loop to calculate sum, I've tried many different ways but its …

Software Development java
Member Avatar for Katana24
0
93
Member Avatar for ultimatebuster

Is python web programming anything like php? Is there simple examples like submitting a form to perform a calculator functions etc?

Software Development python
Member Avatar for snippsat
0
117
Member Avatar for buzzykerbox

Hey gang, I have a string array containing 10 words,I would like to randomly pick one of these words, how do I go about it,cant find any tutorials???? Thanks Buzz

Software Development c++
Member Avatar for mrnutty
0
92
Member Avatar for mrynit

This program is a GUI shopping menu with text fileds next to item descriptions. My question is about the add method in ShippingCart class. It is called every time an action occurse in a text field, from a GUI class not shown here, where quantity requests are entered. So when …

Software Development gui java pdf storage
Member Avatar for Ezzaral
0
214
Member Avatar for pyprog

I want to remove all the 1's from the sublists so l becomes [[2], [2], [2]] but have trouble keeping track of indices. Can someone help out? [CODE]l = [[1, 2, 1],[1, 1, 2],[2, 1, 1]] i = 0 for element in l: while i < len(element): if element[i] == …

Software Development python
Member Avatar for vegaseat
0
144
Member Avatar for Manny7

Hey there :) i am trying this part of code, which testing arguments on command line: [CODE] use Getopt::Long; GetOptions( "verbose" => \$verbose, "get" => \$get ); print "verbose = $verbose\n"; print "get = $get\n"; [/CODE] In my script i have several arguments, with which my script working (any sequence). …

Software Development perl
Member Avatar for Murtan
0
187
Member Avatar for mgern26

Hi im writing a code that is supposed to display this * ** *** **** ***** **** *** ** * i have this so far for (int i=0;i<6;i++){ for (int j=0;j<i;j++){ which displays this * ** *** **** ***** how do i get the reverse side

Software Development java
Member Avatar for mgern26
0
84
Member Avatar for priyankapandey

can anyone explain how can a function return a double pointer with which a 2 dimensional array can be traversed, this function takes the number of rows and columns as arguments: like: void ** function(int row, int col) { void **returningPointer= NULL; void*p; for (i = 0; i < row; …

Software Development c
Member Avatar for Narue
0
1K
Member Avatar for VinayRok

Hi all, I want to zip a files with directory structure. Suppose i have Folder name C:\examples This folder may contain sub folder and files also.. And i need code which zips with folder structure.. not only a just a file.. it should also zip folder to..! I search in …

Software Development
Member Avatar for kvprajapati
0
81
Member Avatar for Axel_Carvalho

Hello. I need some help. I have a function [icode]my_function(a, b, c, d)[/icode] which takes string parameters and output them in different combinations. It works well in IDLE, but I would like to output the result into a file. Such code [code=python]file = open("out_file.txt", 'w') file.write(my_function(a, b, c, d)) [/code] …

Software Development python
Member Avatar for Axel_Carvalho
0
132
Member Avatar for viveks.nair1988

How do i join two tables in MySQL to form a third table having certain columns from both the tables?:?:

Software Development mysql
Member Avatar for Geekitygeek
0
79
Member Avatar for Noob.exe

I'm making program similar to keylogger (in vb2008), that detects keys pressed and then save it... How can i make, that program will name .txt file like "29.3.20010.txt"? im using this code to make a file: [CODE]Dim file As System.IO.FileStream file = System.IO.File.Create("C:\Key\Keylogg.txt")[/CODE] how can i insert Date: [CODE]Dim dtmDate …

Software Development vb.net
Member Avatar for Noob.exe
0
165
Member Avatar for Comatose

Swaps Two Elements Of An Array (So that say, indice1's value would become indice2's value, and vice versa). Simple Code Piece Really...

Software Development visual-basic
Member Avatar for vb5prgrmr
0
259

The End.