132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for ilvanhellovan

i need help,, i have a text file like this below Line 1 Line 2 Line 3 my question, how to readfile from that txt line by line using Win32 API and output to console... can anyone help me,, i'm very new in c++ Thanks

Software Development api c++
Member Avatar for Ancient Dragon
0
221
Member Avatar for chris.vargas.773

so i made this program with a function call and definition and i keep having problems with the call function and i get error C2059: syntax error : 'return' when i build my program. #include <iostream> #include <cmath> #include <iomanip> using namespace std; int math (double cartons, double totalcost, double …

Software Development c++
Member Avatar for chris.vargas.773
0
131
Member Avatar for cmstoner

In my program, I have a section to insert information about a customer into an Access database. I get the error below at the .ExecuteNonQuery. Message: System.Data.OleDb.OleDbException (0x80004005): Field 'Customer.Business_Phone' cannot be a zero-length string. at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr) at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& …

Software Development microsoft-access sql vb.net
Member Avatar for cmstoner
0
841
Member Avatar for nathan_drake

Nothing bothers Bob more than when taller people stand up in front and block his view at sporting events. It bothers him so much, that he has developed a measure for the displeasure that a crowd feels because of this phenomenon. Most days, he calls his measure the Index of …

Software Development c++
Member Avatar for SoreComet
0
242
Member Avatar for PatSharbaugh

Earlier today, I was very bored. I set out to see if I could write a program that would solve 24 problems (see [Wikipedia](http://en.wikipedia.org/wiki/24_Game)). Now, I was bored, mind you, and I thought, "Can I solve it in 1 line of code?" NOTE: I do not recomend this approach, it …

Software Development asp.net
Member Avatar for nerdwerd
0
174
Member Avatar for amass

Hello, i have this sqlexception errors when i try to insert data into my sql2005 from vb2008. SqlException unhandled : Incorrect syntax near '12' and also near '3' I am sure it is coming from the datetimepicker. However the same code is working on other forms in the same program. …

Software Development vb.net
Member Avatar for amass
0
289
Member Avatar for O_mini

Hello, thanks for taking the time to read this. I'm working on (what should be) a simple, simple java program, I am very new to java so please bear with me. I'm writing code with a method that takes an array of int values and determines if all the numbers …

Software Development java
Member Avatar for Taywin
0
3K
Member Avatar for JavaPrograms

How do I put the following output in a table format as shown below in the code?

Software Development java
Member Avatar for JavaPrograms
0
263
Member Avatar for nIcks123

How do i avoid the entry of Numbers in a textbox?

Software Development vb.net
Member Avatar for Reverend Jim
0
206
Member Avatar for colombn4life

Im supposed to make a little game in which you're supposed to guess a letter in 6 tries. It reads the letters from a text file. I get a bunch of errors and dont really know what to do. Any suggestions? #define _CRT_SECURE_NO_DEPRECATE #include <stdio.h> #define MAXGUESSES 6 //this function …

Software Development c
Member Avatar for WaltP
0
251
Member Avatar for jalpesh_007

Dear all, I have declared following two hashmap. `public static HashMap<Integer,String[]> m1 = new HashMap<Integer,String[]>();` `public static HashMap<Integer,String[]> temp = new HashMap<Integer,String[]>();` At starting point of my execution both map will contain key from 1 to 20 and mapped value with it. Means key value pair are same in both …

Software Development java
Member Avatar for NormR1
0
360
Member Avatar for wolverinnas

pls help how to use e.hasmorepges..below these code private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) { // e.Graphics.DrawLine(Pens.Black, 20, 20, 800, 20); e.Graphics.DrawString("INVOICE NO:", new Font("Times New Roman", 11, FontStyle.Regular), Brushes.Black, 40, 75); string uer = dateTimePicker1.Text ; e.Graphics.DrawString(uer, new Font("Times New Roman", 11, FontStyle.Regular), Brushes.Black, 500, 75); string N = …

Software Development
Member Avatar for wolverinnas
0
154
Member Avatar for s1lkman

import java.util.*; public class MyLinkedList { private Node head; private class Node { private String element; Node link; } public MyLinkedList() { head=null; } public void insertAtHead(String ele) { Node curr = new Node(); curr.element = ele; curr.link = head; head=curr; } public void insertAtTail(String ele) { Node curr = …

Software Development android data-structure java linked-list
Member Avatar for Taywin
0
120
Member Avatar for Bumpehh

so i was bored and decided to make a dice simulator, and i ran into a error. heres the code #include <iostream> #include <ctime> #include <cstdlib> using namespace std; int total[12]; int dice1; int dice2; int aitotal[12]; int aidice1; int aidice2; void Roll(){ srand(time(0)); dice1 = 1+ (rand() %6); dice2 …

Software Development c++
Member Avatar for Bob
0
164
Member Avatar for addicted
Member Avatar for Bob
0
2K
Member Avatar for Yarra

How do I graph a parabola using an equation where the user can just input an angle and velocity. And is it possible to have an object follow this path?

Software Development java
Member Avatar for Taywin
0
110
Member Avatar for caswimmer2011

Hey, I am trying to use a for loop inside a recusive method, but everytime the method runs recursively, the integer in the for loop resets to zero because of the initialization. Is there anyway to keep the integer counting up, and not resetting to zero? Thanks in advanced!

Software Development java
Member Avatar for Taywin
0
148
Member Avatar for akashi

Problem Statement - Case Study : Simulation of a Parking System Consider a Parking System with a machine, handling parking process and payment process. This machine has a card slot-in and slot-out, a customer console (keypad and display) for interaction, a cash collector and a cash dispenser. The machine will …

Software Development c++ session
Member Avatar for WaltP
0
327
Member Avatar for Zion_Chibi

I have a few sets of username and password in the file but when I try to login, the program could only read the first set of username and password. The rest will be invalid input eventhough I key in correctly. #ifndef USERLOG_H #define USERLOG_H class UserLog { public: char …

Software Development c++ ios
Member Avatar for WaltP
0
475
Member Avatar for regina.elmose

I apparently can't figure out what I am doing wrong....I have been reading all day and googling help but it hasn't helped. Here's what I have... public static void main(String[] args) { ArrayList<Animal> animalCensus = new ArrayList<Animal>(); Scanner input = new Scanner(System.in); //int uniqAnimal = 0; //String animalName; String endList; …

Software Development java
Member Avatar for Taywin
0
571
Member Avatar for khalidshakar

** Please Help. When I call this class, it causes the program to stop responding? Actually I used a button must be clicked to start call the class in another class to run it. after I press that button it causes the program GUI to stop responding. I am developing …

Software Development gui java
Member Avatar for JamesCherrill
0
3K
Member Avatar for nitin1

in my exam, there was a question: what is linux/command which can't be ignored in any way? write the command to kill a process having id 1234 ? my answer was : SIGKILL and for second part i have written a C code function kill(1234,SIGKILL). now my teacher is saying …

Software Development c
Member Avatar for nitin1
0
116
Member Avatar for rony001

I am new to vb.net, I want the first column of the unbound datagridview to have defult value such as item1,item2. item3 on form load event . I would appriciate if someone tell me how to add defult values in a column like this and save all three rows in …

Software Development open-source vb.net
Member Avatar for Gé48
0
482
Member Avatar for sss93

Ive got a basic Qt console application whcih write and then reads back an xml document.I have compiled and ran this without any compilation errors, however for some reason it keeps returning an error code and then wipes clean the actual xml document ??? Can someone please explain why it …

Software Development c++ file-stream qt xml
0
152
Member Avatar for Chonco
Member Avatar for brylle
0
101
Member Avatar for riahc3

I was going to start Apache/Tomcat as root but Ive rethought it and have gone against it. How can I make my web service read/write from "/"? I keep getting permission denied exceptions...

Software Development apache java
Member Avatar for riahc3
0
195
Member Avatar for pratiksavliya
Member Avatar for ddanbe
0
58
Member Avatar for tokipot

hi, im new here, ahhm can u help me abt my project, its a library system that have database and u need to login first to borrow a book, first u need to register, after register you will have ur profile, that profile consist of searching and borrowing books, and …

Software Development visual-basic
Member Avatar for AndreRet
0
958
Member Avatar for ss123456

i have a database consisting of a table PROJECT(p_id,p_name,P_manager) i am using oracle 9i as my backend and auto increment is possible only through triggers and sequence. instead i would like to retreive the data p_id onto a combo box. simply put- when i add data into my table PROJECT …

Software Development oracle visual-basic
Member Avatar for AndreRet
0
2K
Member Avatar for ali11

I am receiving this error markup.c: In function ‘GetPrice’: markup.c:16:23: error: ‘markup’ undeclared (first use in this function) markup.c:16:23: note: each undeclared identifier is reported only once for each function it appears in markup.c:17:1: error: ‘output’ undeclared (first use in this function) here is my codes // File: markup.c #include<stdio.h> …

Software Development c
Member Avatar for VatooVatoo
0
189
Member Avatar for prakhs

#include <stdio.h> main() { char *s1, *s2; printf("Enter string 1 :"); scanf("%s", s1); printf("Enter String 2 :"); scanf("%s", s2); printf("%s\n%s", s1, s2); } The output of 1st string is right and the output of 2nd string is wrong (i.e. (null)) Can any 1 explain what is going behind?

Software Development c
Member Avatar for prakhs
0
212
Member Avatar for HibaPro

i have two row in my dataGridView one store the labour working hour (Time) and the other one is store the cost of one working hour , i need to multiply these two row but its give me this error : operator * is not defined for type timespan and …

Software Development vb.net
Member Avatar for HibaPro
0
620
Member Avatar for HibaPro

hey everybody , i need the help plzz,,, i have an application that developed using vb6 and i have its database that design by sql server , but i dont know how to make it run , when i run the application its give me the following error : Dim …

Software Development database-design visual-basic
Member Avatar for HibaPro
0
706
Member Avatar for parthibanrock

how to convert vb.net and sql server 2005 into .exe file the exe file can be run in the another system but it cannot be save the data. the connection string can be errored because my computer name and another computer name is different . how to solve this problem. …

Software Development sql vb.net
Member Avatar for Ashish salve
0
272
Member Avatar for Dendei

Hello, i am programming an API so far i've coded so i can create new customers but my taughts here is that i have a function (i think that is the right word for it) public void writeCustomer (string CustomerNumber, string CustomerOrgNumber, string CustomerName, string PostAdr, string PostAdr2, string GLN, …

Software Development api
Member Avatar for Dendei
0
248
Member Avatar for shahai.ali

hi am using a tab control. in which i have already 3 tabpages. now the problm is that when the form is loaded the first tabepage must be enable while other will be disable to access untill i press the button that first tabpage is contain. is their solution for …

Software Development
Member Avatar for AnnieCalvert
0
1K
Member Avatar for bryceburry

Well, I'm making a tic-tac-toe game in Python **2.7**, and I need a code snippet to "make" the AI want to get a Tic-Tac-Toe, and make the game end if there's a **draw**. What can I do? This is the code as it is: # Python Tic Tac Toe import …

Software Development python
Member Avatar for TrustyTony
0
446
Member Avatar for Swati_1

main() { printf("\nab"); printf("\bsi"); printf("\rha"); } output =hai could you please explain me how output came out to be "hai"?

Software Development c
Member Avatar for np complete
0
133
Member Avatar for dinzky0307

i have 2 forms.. the first one is for displaying students record while the other one is for searching student record (in datagrid) i want to display the searched record of a student from form2 to textboxes in form1..how is this possible? If DataGrid1.Col = 0 Then If Text1.Text = …

Software Development display visual-basic
Member Avatar for ChrisPadgham
0
1K
Member Avatar for abelingaw

I've done programs to save values to a dbase from a certain control, but done one by one. Scenario: * There are 7 textboxes where values are entered. * There are also 7 rows (but in one column only) for each values when save button is clicked. Problem: * How …

Software Development visual-basic
Member Avatar for ChrisPadgham
0
138
Member Avatar for Stpdoug

Hey guys i am having a small problem with this calculation in bold: **amtwon = (pow(pbet,2) / pow(pbet,2-100 *pbet))** ; amtlost = ( 0.35 * pbet); totalwin = (amtwon - amtlost); this is the block of code.the problem is **amtwon** totalwin is supposed to return a value of 23.993.18 but …

Software Development c c# c++
Member Avatar for Stpdoug
0
287
Member Avatar for bladelord76

Hello, everyone! I just have a simple question, I think. I have created three unique classes, and each of these classes use some of the others as member variables. However, because of the way the code is organized, I often receive the error "CLASSNAME is not declared" when trying to …

Software Development c++
Member Avatar for bladelord76
0
266
Member Avatar for compulove

Help writing inventory program in vb! I am writing a program that is a multi-form inventory program for a bookstore with data saved in a textbox. Here is what I need to do: Write a menu-driven multiform inventory program for a bookstore with data saved in a text file. Help …

Software Development vb.net visual-basic
Member Avatar for ChrisPadgham
0
159
Member Avatar for rob.brown.315080

Hello all, I am trying to create a program which keeps track of football stats for individual players. The program is setup to read a list of players names, numbers, and positions from a .txt file and then put them into a strctured array, print them to the screen, and …

Software Development c++ file-stream file-system
Member Avatar for WaltP
0
203
Member Avatar for Benchanda

Hi i wana know how to create a program in vb.net that calculates the salary based on the work experience and the highest qualification some one has eg (Diploma or Degree)

Software Development vb.net
Member Avatar for brylle
0
75
Member Avatar for PinoyDev

I have a program created in dev-C++. It works find and no errors but when I transfer to microsoft visual C++ express edition I got this error. "No such file or directory found for "windows.h". In dev-C++, I can found windows.h in C:\Dev-Cpp\include but not in Microsoft VC++. Whats the …

Software Development c++
Member Avatar for Ancient Dragon
0
319
Member Avatar for ome2012

i just want to know from you guys about the use of finally in Try Catch code????

Software Development vb.net
Member Avatar for ome2012
0
203
Member Avatar for gajoline.marascino

class ThreeException extends Exception { /** * */ private static final long serialVersionUID = 1L; static int count = 0; public static void main(String[] args) { while(true){ try{ if(count++ == 0) throw new ThreeException(); System.out.println("No Exception"); } catch(ThreeException e){ System.err.println("Three Exception"); } finally { System.err.println("In finally clause"); if(count == 2) …

Software Development java
Member Avatar for gajoline.marascino
0
160
Member Avatar for orar

#include<iostream> using namespace std; #include<iostream> using namespace std; void main() { int a ,b,c; cout<< "Enter three integers"<<endl; cin>>a,b,c; if (a<b && a<c) cout<<"a is less"<<endl; if (b<c && b<a) cout<<("b is less"); if (c<a && c<b) cout<<"c is less"<<endl; else cout<<"all numbers are the same"<<endl; }; I GET A …

Software Development c++
Member Avatar for np complete
0
282
Member Avatar for kshahnazari

Have a question , if we can compare two arrays for equality like this #include <iostream> using namespace std; int main() { int a[5],b[5]; for (int i=0;i<5;i++) { cin>>a[i]; cin>>b[i]; } if (a==b) cout<<"they are equal"; } as you see isnt there a way like this or a function to …

Software Development c++
Member Avatar for L7Sqr
0
147

The End.