132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for raidernation

#include <fstream> #include <cctype> #include <iostream> #include <string> const int num=1024; using namespace std; int main(){ ifstream file; string s; int i=0; file.open("words1.txt"); while(getline(file,s)){ for(int i=0; i< s.length(); i++){ cout << s[i];//prints out the text file just fine. "a dog." cout << s[0]; /*prints out random stuff. <---my problem. All …

Software Development c++ file-system
Member Avatar for raidernation
0
1K
Member Avatar for efecto

Hi there. I want to create a program on windows 7(32bit) that can rename photos based on date and time taken in meta data. I would like it to have a user interface window where users can simply drag photo files onto the scrollList.. then a button that executes a …

Software Development c++ gui ide user-interface
Member Avatar for Ancient Dragon
0
180
Member Avatar for Zephyr-

So basically what I want to do is when user clicks button1 it pops up something like a message box that has a yes and a no button. If user clicks no, then it's no. If user clicks yes, then it's yes. It's like a confirmation. To do so, I …

Software Development
Member Avatar for Momerath
0
210
Member Avatar for jshoot

[B]Hi every one, I'm working in a code from 1 mounth, and now I finaly finished, it work, but there is the old problem in C++ language, the interface, once that I wan't to do a program that will be used for anothers users, I wanna to make the program …

Software Development c++ gui user-interface
Member Avatar for Stefano Mtangoo
0
455
Member Avatar for python01

Hi all, I was just wondering if it is possible to use python to send pulses of 5 v (default) through the parallel port. I have made up a circuit board to interpret the pulses, yet this isn't helpful since there are no pulses to receive. Here's some specs( maybe …

Software Development python
Member Avatar for python01
0
241
Member Avatar for Joshua Kidd

how do i open a menu to exit the application when i right click on notifyicon in the systemtray? thanks.

Software Development vb.net
Member Avatar for Joshua Kidd
0
429
Member Avatar for douglaspr

Good evening, was wondering how can I read data record from a text file, if they want to read data from a text: (Offset : $4C8259; MemDump :($A1, $38, $BD, $4C, $00, $8B, $00, $8B, $4D, $FC, $BA, $C0, $82, $4C, $00, $E8, $1F, $F1, $FF, $FF, $33, $DB, $E8, …

Software Development pascal
Member Avatar for delphiman
0
207
Member Avatar for poloblue

Good Afternoon, I need help on this assignment from school, I'm getting this error C2660: 'clockType::setTime' : function does not take 4 arguments. I need to make the class functional by the client program testClockClass.cpp. Below are the code that I have so far: testClockClass.ccp [code] #include <iostream> #include "extClockType.h" …

Software Development c++
Member Avatar for Narue
0
311
Member Avatar for tomtetlaw

I've seen macros like this: [icode]#define $Line #__LINE__[/icode] and I was wondering what the effect of the $ symbol has in a macro?

Software Development c++
Member Avatar for tomtetlaw
0
128
Member Avatar for BioJavaPhobic

Below is part of some code I have written. I am trying to see whether nodes in a network are connected, and thus finding 'failurepoints'. I have a vector containing node Ids which I loop through to check for connections using a hasPath method. This all works fine, but my …

Software Development java
Member Avatar for BioJavaPhobic
0
649
Member Avatar for sketchiii

The code I wrote for a digital clock always falls behind the clock in my windows 7 taskbar after being run for like 2-3 mins. Why? Here's the code: [CODE]#include <stdio.h> #include <time.h> #include <windows.h> int main() { int h,m,s; time_t epoch_time; struct tm *tm_p; epoch_time = time( NULL ); …

Software Development c
Member Avatar for Adak
0
224
Member Avatar for triple sick

Ok, so in this program, the user enters a number and it assigns that number to "answer". Now I have a bunch of strings already named by numbers, it starts out with "one", "two", "three" and so on being valued as a dash sign "-". So say they enter "five", …

Software Development c++ os-x
Member Avatar for VernonDozier
0
155
Member Avatar for Katana24

Hello - I've used a for loop to fill an array of JButtons with text. Each JButton contains a letter of the alphabet. I've been successful in doing this and adding each button to a panel I created. But my problem is that I've tried, unsuccessfully, to add ActionListener's to …

Software Development java
Member Avatar for ztini
0
2K
Member Avatar for manongjulius

so. . . i guess you could say i'm kinda new here but. . . this site really helps me alot this past few days and i decided to join... i was surfing all over the internet and i can't find what's the problem with my program. this always says …

Software Development c++
Member Avatar for manongjulius
0
289
Member Avatar for Phil++

Hello, I am trying to connect to a database "database1" using C#, however, everytime that I try to connect I get this error: [I]Unable to connect to any of the specified MySQL hosts.[/I] This is the code that I am using to connect to database1 [code] string connString = "Data …

Software Development mysql open-source
Member Avatar for Momerath
0
87
Member Avatar for kukuruku

Hi,I have a question ,which one is a better way to set constructor [CODE]public Employee(String name,double hours,double perHour,Date dateOfHire){ id=++count; setName(name); setHours(hours); setPerHour(perHour); this.dateOfHire=new Date(); } [/CODE] or [CODE] public Employee(String name,double hours,double perHour,int day,int month,int year){ this(name, hours, perHour, new Date(day,month,year) ); [/CODE]

Software Development java
Member Avatar for Mitja Bonca
0
126
Member Avatar for carlitosway17

Hi am trying to create a random sentence generator for my Java Class the only issue is it builds successfully and rans fine but the output is not what is expected of the program. It should randomly generate 20 sentences. Here is my code [CODE]// Exercise 16.5 : Sentences.java // …

Software Development java
Member Avatar for carlitosway17
0
6K
Member Avatar for bestex

[CODE] IsConnected("Select count(ID) from transaction", False) If myDR.Read = True Then Me.TextBox1.Text = myDR.GetValue(0) + 1 Else Me.TextBox1.Text = 1 End If TextBox1.Focus() End If[/CODE] im going to ask how can i make my autonumber like these "10001" instead of "1" can anyone help me to fix my code??

Software Development vb.net
Member Avatar for codeorder
0
147
Member Avatar for Jaily

I've made a simple webserver in C++ based on this one [URL="http://http://msdn.microsoft.com/en-us/library/ms737593%28v=VS.85%29.aspx"]here[/URL]. And this works fine. Now, my assignment is to pass some info from this server to an html-file that later can be opened in IE or Firefox and then display info like screen resolution. Now.... This is supposed …

Software Development c++ ios
Member Avatar for tundra010
0
108
Member Avatar for lochnessmonster

i was always taught put the variables u plan on using in a function at the top of it! im curious if it's considered bad programming practice to only define variables when they are going to be used/need to be used....for example possibly midway or further into a function?

Software Development c++
Member Avatar for spoonlicker
0
124
Member Avatar for nadav64

Hi Guys!,I have a question,I have 2 text boxes and one text box has the name of a song and the other has the name of the artist. I would like to take the value of each text in the text box,for example song-only girl artist-rihanna after i inserted this …

Software Development
Member Avatar for Mitja Bonca
0
159
Member Avatar for doyler

I've been messing around with basic GAs in Java but I seem to have run into an algorithmic problem but can't seem to find where exactly. My code seems to narrow down the average fitness very quickly, but then seems to hover around the right answer without getting there pretty …

Software Development java
Member Avatar for doyler
0
137
Member Avatar for sketchiii

I figured out how to use time in C since the last time I asked a question here. :cool: My new dilemma is that I was wondering if its possible to save user input in a C program so that when the program is closed and executed again it will …

Software Development c
Member Avatar for sketchiii
0
194
Member Avatar for odiejodie

i am trying complete a simple login where the username and password are flat within the program...... i have absolutely no idea on how to do it! i am using a jdialogue form in netbeans and have designed the facial however i simply dont now how to compare what is …

Software Development java
Member Avatar for mKorbel
0
86
Member Avatar for 24x24

I am to write a program that converts either binary, hex or octal to decimal. We are to use methods for the first time (Not a problem). I have written almost all of the code but the conversion. We can't use int.toDecimal or any shortcut. All must be long coded …

Software Development java
Member Avatar for 24x24
0
238
Member Avatar for Jutch

I have a project I am working on but I honestly can't get a hold of a good jump off point. I'll post the pseudo code. I really need the help please. It is for a GUI C++ program. Please help me if anyone can. All I need is a …

Software Development c++ gui
Member Avatar for Jutch
0
148
Member Avatar for ram619

ITS NOT MY HOME WORK I m Just Keen to do it. I don't want you to give me the code. I just want you to tell me how to access VDU and directly change character on same screen. The screen is divided into 25 rows and 80 columns. The …

Software Development c
Member Avatar for Adak
0
624
Member Avatar for carlitosway17

Hi guys am creating a Binary Search Tree Program so far it works fine and everything but I am trying to arrange the random numbers generated after the in order transversal in ascending order here is my code [CODE] // C // This Binary Search Program inputs 25 Random workers …

Software Development
Member Avatar for carlitosway17
0
2K
Member Avatar for aaron385

Hello Friends, I am new to .NET and to this forum too. I need to move approx 2K rows from an oracle to SQL server table every week. I am planning to develop a C# console application to achieve this. Any ideas how to start and what is the best …

Software Development oracle sql
Member Avatar for Momerath
0
320
Member Avatar for scarlettmoon

Hi All ~ So the program actually compiles without using arrays or global variables, outputs the correct user input, however average score and lowest score values that compute are wrong. I have no idea where the heck I'm messing up but I am hoping you can help me. The findLowest …

Software Development c++
Member Avatar for scarlettmoon
0
303
Member Avatar for debayanmitra

I want to capture a still picture in any format like .png,.jpg,.bmp etc. using a webcam. And want to save that in directory. Please help me.

Software Development image vb.net webcam
Member Avatar for jlego
0
223
Member Avatar for Mike Bishop

i have this code and it kinda works but not properly. i need it to look at the coloum in a datagrid and make the back colour red if over 1.6(in sql this field is saved as Varchar(10)) but at the min, i have a value of 1.5 and it …

Software Development sql vb.net
Member Avatar for msrd
0
72
Member Avatar for Hoff123

Hi! I am kind of new at pygame and I can't use functions. I define the "screen" variable outside of all functions(the "screen" variable is the "window"), and I can't use it in functions. I know it has to be global, but that won't work. Anyway the best i can …

Software Development python
Member Avatar for Hoff123
0
5K
Member Avatar for people people

I am trying to make a simple game for class but I am getting hung up on one of the parts. There are two dice that roll and then you can input either the full sum or multiple numbers that equal the sum (ex. dice = 10 you could pick …

Software Development python
Member Avatar for TrustyTony
0
128
Member Avatar for mgorecki

Hello, I have a class (Class.vb) that has a variable dimmed (newOption) as a String. I've created a Form with 3 radio button options and OK/Cancel buttons. The form code has Subs for each option as follows: Friend Class dialogArraySelection Public Event notifycomplete() Public bgaSelection As String Public Sub radFullArray_CheckedChanged(ByVal …

Software Development vb.net
Member Avatar for mgorecki
0
79
Member Avatar for bwbyron

So this is my original code. [CODE] import random hints = {"python" : "A program", "jumble" : "The act of mixing up", "easy" : "Facil is to Spanish as ____ is to English", "difficult" : "Not eaay, but ____", "answer" : "To ____ a question.", "xylophone" : "An instrument. Also …

Software Development python
Member Avatar for woooee
0
753
Member Avatar for jacksantho

Hi, I have installed ActivePerl-5_6_1_631 and Web server Apach_1.3.22. I am using HTML Frameset in PERL/CGI. Facing problem in displaying HTML Frameset. Please check my coding.. [B][I]Sample.cgi [/I][/B][CODE]#!c:/perl/bin/perl use CGI qw(:all); $login=uc(param('uid')); $passwd=param('pwd'); $kid = time; $cookie = cookie(-name=>'logtime', -value=>$kid, -path=>'/cgi-bin/'); if ($login eq "" || $passwd eq "") { …

Member Avatar for Dandello
0
289
Member Avatar for Michael27

I have hard-coded this array of ints [CODE]int[] numbersToSort = {100, 23, -1, 3, 99, 0};[/CODE] I want to use Console.Readline() to take input from the user, but it only takes string input. I can't use Convert.ToInt32() because it doesn't take array for parameter. How can i convert array of …

Software Development
Member Avatar for Mitja Bonca
0
135
Member Avatar for jsfrocha

Hi, I just installed Dev-Cpp for a IT class and started up with a basic program to see if all was alright: [CODE]#include <stdio.h> int main() { printf("Ola Mundo"); system("PAUSE"); }[/CODE] Still, when i tried F9 (Compile & Run), appear this errors: [Linker error] undefined reference to `__dyn_tls_init_callback' [Linker error] …

Software Development c
Member Avatar for jsfrocha
0
354
Member Avatar for chess2009

Could you please help why my program goes through do while loop just once, although the condition is true. //Program is getting numbers from user and realize whether they are correct numbers for triangle side or not and if tey find out the area// [CODE] #include<stdio.h> #include<math.h> double TraingleArea(); int …

Software Development c ide
Member Avatar for Adak
0
132
Member Avatar for SolidSora

I want the program to draw the key that is pressed on the screen. When I press a key, nothing happens. Class where the draw code is: [CODE]/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package lab5; import java.awt.Color; …

Software Development java java-swing
Member Avatar for Ezzaral
0
159
Member Avatar for fg_aa_c

Hi I have written the following code but when I run it, it fails to bind every time, any ideas why? [CODE]int main(int argc, char *argv[]) { int port = 1080; int lsd, sd; struct sockaddr_in serv_addr, remote_addr; socklen_t remote_len; if(argc < 2 || argc > 2) { printf("Syntax is: …

Software Development c
Member Avatar for fg_aa_c
0
1K
Member Avatar for pseudorandom21

I found this excellent video on one of Microsoft's websites: [url]http://msdn.microsoft.com/en-us/ff728575[/url] I'm really just wondering how to organize the window procedures for my Dialogs/Buttons/etc. Would one normally after creating a dialog throw the window procedure into a new file? I don't like tiny bits of code in different files, so …

Software Development c++
Member Avatar for BitBlt
0
159
Member Avatar for MacUsers

Dear all, I was trying out OptionParser() and didn't quite understand who to use it correctly. This is my sample script: [code=python]#!/bin/env python from time import strftime from calendar import month_abbr from optparse import OptionParser # Set the CL options parser = OptionParser() usage = "usage: %prog [options] arg1 arg2" …

Software Development python
Member Avatar for MacUsers
0
209
Member Avatar for caltech

Total newbie, I need more help... If you could just give me a basic structure for what I'm trying to do and an explanation, that would help a whole lot. Here's my assignment: [INDENT] 1) Write a function [I]divides[/I]. The function accepts two parameters: a number and a possible divisor. …

Software Development c++
Member Avatar for reemhatim
0
137
Member Avatar for Timmo987

Hi! I need to be able to change the location of the database at runtime through a menu in my program. My question is how to best achieve this. If for example the ip to the server change, the user need to be able to update the database path; i.e. …

Software Development asp.net mssql sql
Member Avatar for Timmo987
0
191
Member Avatar for tuxhats

The script below is what I have. It does not block other computers that are not in this firewall Check_Mac list. Where is the mistake? Thanks!!! tuxhats #!/bin/sh IPT="/sbin/iptables" # Change to your server ip like this LAN="10.229.2.0/24" , leave the "0/24" alone LAN="10.229.1.0/24" $IPT -P INPUT DROP $IPT -P …

Software Development router-proxy-firewall shell-scripting
0
134
Member Avatar for Celtrix

Im having trouble with gtk open file dialog it will open the first time but after i closed it i cant reopen it Ive tried casting it as different objects but i cant seem to fix it. After attempting to reopen the dialog box it spits out gtk_dialog_run: assertion 'GTK_IS_DIALOG …

Software Development c++
Member Avatar for Celtrix
0
186
Member Avatar for davetheant

Hello everyone. I am wondering how to get started with ASM. I tried a few times to install things like radASM (and others) but I don't really know what they are all for. Can someone just tell me how to get started and about compilers/builders? Thanks.

Software Development assembly
Member Avatar for BitBlt
0
296
Member Avatar for ChuckRussell

I am having trouble overriding the virtual functions from the parent class Label. Can anyone please help me on what the correct syntax for the declaration and implementation of OnMouseEnter, OnMouseDown, OnMouseLeave, OnMouseUp etc. [CODE=C] using namespace System; using namespace System::Collections; using namespace System::Linq; using namespace System::Text; using namespace System::Drawing; …

Software Development c++
Member Avatar for ChuckRussell
0
168

The End.