132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for Mr_PoP

[CODE] #include <iostream> #include <fstream> using namespace std; void LOGMSG(string test) { ofstream log; log.open("text.txt"); log << test.c_str(); } int main() { LOGMSG("this is a test"); LOGMSG("this is a test2"); LOGMSG("this is a test3"); } [/CODE] but it's only writes the last line i mean the last time i called …

Software Development c++
Member Avatar for MasterGberry
0
497
Member Avatar for MasterGberry

I am getting 2 different compiler errors of the following: AoE2Wide.cpp(1089): error C2679: binary '=' : no operator found which takes a right-hand operand of type 'AoE2Wide::DrsItem' (or there is no acceptable conversion) 1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\vector(599): could be 'std::vector<_Ty> &std::vector<_Ty>::operator =(std::vector<_Ty> &&)' 1> with 1> [ …

Software Development c++ microsoft-access visual-studio
Member Avatar for MasterGberry
0
198
Member Avatar for nomadewolf

Hi, I have this struct: [CODE]typedef struct empresa { char nome_empresa [20]; MORADA morada_empresa; int nif; int telefone; int anocriacao; char cae [20]; ESTAGIARIO estagiarios [MAX_EST]; int num_est; } EMPRESA;[/CODE] And an array of this struct: [CODE]EMPRESA empresas [MAX_EMP];[/CODE] My problem is that when i try to, manually assign values …

Software Development c++
Member Avatar for osirisgothra
0
149
Member Avatar for alonewolf23

Is it possible to print the .00 in the Part_Price[] so it would say 11.00 instead of 11. [CODE]#include <cstdio> #include <cstdlib> #include <iostream> using namespace std; double Part_Code[10]={1,2,3,4,5,6,7,8,9,10}; double Part_Number[10]={101,202,303,404,505,606,707,808,909,1010}; double Part_Price[10]={5.00,4.00,6.00,8.00,10.00,11.00,15.00,20.00,3.50,12.50,}; double Number_OnHand[10]={20,15,10,50,13,5,9,7,15,6}; int main(int nNumberofArgs, char* pszArgs[]) { int Pnumb,i; cout << "Enter Part Code '1' thru …

Software Development c++
Member Avatar for mrnutty
0
135
Member Avatar for justin3085

Ok, I have the ever popular Inventory Program in a JAVA class going on. I have successfully created a new class to hold the GUI information. I have the window sized and the title of the window placed. When I run the program the GUI shows up. Next I need …

Software Development gui java
Member Avatar for Akill10
0
105
Member Avatar for sravan953

Hey all, It's been a really really long time since I did any Python programming; upon the launch of the Web Store - I've been interested in developing a basic app myself. So here I am! Anyways, can anyone tell me if its possible to make a Packaged App using …

Software Development python seo web-browser
Member Avatar for Stefano Mtangoo
0
181
Member Avatar for simonfoley

Hi there More noob questions from yours truly! As part of the application I'm writing in Visual Basic, I have written code to display records in text boxes and cycle through each of them one record at a time. I'm having trouble getting the code I've written to update records …

Software Development vb.net visual-basic
Member Avatar for ShahanDev
0
132
Member Avatar for Resentful

I was browsing the internet for different method to find Pi and I finally found a pretty good one. The only issue is, when you give it a very large number, it slows down tremendously. Would it be possible to make it find 2500 digits a at a time instead …

Software Development vb.net
Member Avatar for zinnqu
0
218
Member Avatar for vik.singh

How can i make a pyhton calculator that launches on click? Thank You.

Software Development python
Member Avatar for bumsfeld
0
154
Member Avatar for skaliam

hi all, im new to python, and i have a problem that needs to be solved. i have the following set: [[5,5,5],[5,5,5,5,5],[]] which needs to end up being: [[5,5,5,5],[],[5,5,5,5]] has anyone got any suggestions?

Software Development python
Member Avatar for griswolf
0
105
Member Avatar for Dorson8009

I've searched all over for an answer to this, including this forum, so sorry if I missed something, anyway, I'd like to get a numerical code from extended characters like ß or ü and so on. I don't use them very much myself, as I'm a native English language user! …

Software Development c++
Member Avatar for Dorson8009
0
169
Member Avatar for iamthesgt

The first day of class today we had an (optional) diagnostic programming assignment. The problem is: to take an input file with a sentence in it, and make all letters except the first one lowercase, make the first letter uppercase, and remove any extra spaces and line breaks. After working …

Software Development c++
Member Avatar for mrnutty
0
218
Member Avatar for crazy8

So i am sort of stuck with this one, due to the error when compiling, noted in the title. (for uni by the way) But basically the idea is that if your aged between 5 and 18 you get the discount. If your over 18 and below 60 and you …

Software Development java
Member Avatar for JamesCherrill
0
106
Member Avatar for vineeshvs

[CODE] #include<stdio.h> #include<stdlib.h> int **array(); main() { int **result=array(),i,j; //display result for(i=0;i<2;i++) printf("\n"); for(j=0;j<2;j++) printf("%d \t",result[i][j]); } //function int **array() { int nrows=2,ncolumns=2,i,j; // printf("hi"); //memory allocation int **array; array = malloc(nrows * sizeof(int *)); if(array == NULL) { printf("out of memory\n"); return 0; } //printf("hi"); for(i = 0; i …

Software Development c
Member Avatar for vineeshvs
0
249
Member Avatar for TailsTheFox

Hello everyone, I am having a slight problem with my program, and that is that It just doesn't seem to be working! I would like someone to help me fix it, because I can't do It myself. The main problem I am having is adding a string to a string, …

Software Development c++
Member Avatar for arkoenig
0
115
Member Avatar for yeticannotski

Dear All, I am a total newbie to Python and programming in general. I know I'd find more materials for Python2, but Python3 was a reflected choice. That said, I have gone trough: [URL="http://www.daniweb.com/forums/thread173960-2.html"]http://www.daniweb.com/forums/thread173960-2.html[/URL] and tried to assemble my spell checker, and ended up with the following code: [CODE]#!/usr/bin/python3 # …

Software Development python
Member Avatar for yeticannotski
0
292
Member Avatar for Singlem

Hey I have a application with two forms: Form1 and Form2 now Form1 displays Form2, but how can I go back to Form1, I know it will not help if I create another instance of Form1. What I have Form1 [CODE] private void button1_Click(object sender, EventArgs e) { Form2 FormMain …

Software Development
Member Avatar for Mitja Bonca
0
171
Member Avatar for Statoeo

Hello, I have a program that was executed appropriately via windows command line, however when i separated the classes into different packages and tried to compile i got some errors. (No problems executing it via Eclipse. Compilation via command line is the problem) MyFrame.java:19: package Control does not exist import …

Software Development gui java
Member Avatar for Statoeo
0
119
Member Avatar for deepakjainmit

how to configure junit application context file with struts........? it is not finding sessionfactory method..........

Software Development java
Member Avatar for ~s.o.s~
0
83
Member Avatar for Vv IVIatthew vV

Hello all, header files seemed pretty simple when i first learned about them. until i actually tried to use my own. The program that i am attempting to create should simply add 1 to 24, but it is using a function found in a header file as a test. The …

Software Development c++
Member Avatar for Vv IVIatthew vV
0
195
Member Avatar for skekre88

i got a such type of error in junit+struts2 +spring org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'sessionFactory' is defined at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:521) at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1068) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:274) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1075) at net.action.TestNew.setUp(TestNew.java:45) at junit.framework.TestCase.runBare(TestCase.java:132) at junit.framework.TestResult$1.protect(TestResult.java:110) at junit.framework.TestResult.runProtected(TestResult.java:128) at junit.framework.TestResult.run(TestResult.java:113) at junit.framework.TestCase.run(TestCase.java:124) at junit.framework.TestSuite.runTest(TestSuite.java:243) at junit.framework.TestSuite.run(TestSuite.java:238) at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at …

Software Development java spring-framework
Member Avatar for ~s.o.s~
0
296
Member Avatar for levanlong

Hi all, I'm not sure this thread is in a right category. I have a problem relating to software design. I'm developing a software to manage member ranking of a chess club in C#. The requirement is: "Each member has a title in club. The title of a member is …

Software Development web-design
Member Avatar for levanlong
0
197
Member Avatar for salmanrauf

What is meant by the throws clause?Where & how is it used?

Software Development java
Member Avatar for JamesCherrill
0
137
Member Avatar for mani_1991

hai, is it possible to loading of tabs in jtabedpane dyanamically in java.. that means i have frame that consinting of one tabbedpane.. in that i have 10 tabs and in each tab consting of another tabbedpane and in that each tabbedpane has 4 tabs and each tab consisting buttons …

Software Development java
Member Avatar for vjcagay
0
168
Member Avatar for n00b3

Hello, I am writing a c++ program for windows using the API. My program needs to be able to get some text from the clipboard, import it to the program's scope as a string, and do work on the string. [what I have tried] [code] cout << GetClipboardData(CF_TEXT) << endl; …

Software Development api c++ windows-api
Member Avatar for Panda_007
0
5K
Member Avatar for htowa

Hello I have problem with adding two numbers that are less than 10 and their result is more than 10. [CODE]#include <iostream> #include <sstream> #include <string> using namespace std; typedef class node * node_pointer; class node { public: int num; node *nxt; }; string reverse (string str) { int len …

Software Development c++ mathematics
Member Avatar for htowa
0
182
Member Avatar for dejanc

Hello VbForum, I`m migrating access database to vb.net. I have employee database with a few DateTimePickers, textboxes, and comboboxes In access I have formulas in textbox's control source like this, and it works: [code] txtDayCalculation =DateDiff("d",txtDateofHire, txtManualDate) txtYear =Int(txtDayCalculation/365) txtMonth =Int((txtDayCalculation-(txtYear*365))/30) txtDay =((txtDayCalculation-txtYear*365))-(txtMonth*30). [/code] So, I have trying to do …

Software Development vb.net
Member Avatar for dejanc
0
510
Member Avatar for WolfShield

Hey everyone, I'm using the NetBeans WYSIWYG, the part where you drag and drop to create the windows and buttons ect. What I am trying to do is open a tutorial for my program from a menu item in the 'Help' menu. My problem is HOW to open a window …

Software Development java java-netbeans ui-ux
Member Avatar for roxin_phoenix
0
150
Member Avatar for bleedi

Hey, I have a bit of a problem. I have a class that uses C libraries to make a TCP connection, which is accomplished with the connect() function. Now, I'd like to use this class in a Qt program and make it inherit QObject. The problem is, since I need …

Software Development c++ qt
Member Avatar for jonsca
0
236
Member Avatar for NewOrder

This is what i have as part of my code: [CODE] class Pawn : Pieces { string name; public Pawn(string piece) { this.name = piece; } public override string pieceName() { return this.name; } [/CODE] Now in the method pieceName, i am not sure what effect there will be if …

Software Development
Member Avatar for ddanbe
0
103
Member Avatar for fireup6

I have a simple form which starts a new thread, and this thread displays the value of a control (TextBox) Form contains: TextBox with default value of "Default" StartButton which starts a new thread Form: [CODE] Public Class Form Private Sub StartButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles …

Software Development vb.net
Member Avatar for Teme64
0
193
Member Avatar for saleh-elyani

Hi everybody I wrote this code in my university assignment . But I want to change the global variable (the variables that above the main) to local variable (inside the main) and add the parameters in the functions. [CODE] #include <iostream> #include <string> #include <iomanip> using namespace std; int const …

Software Development c++
Member Avatar for saleh-elyani
0
160
Member Avatar for x2fair

Everyone..please help me... I cannot save my list item to the database with this code. [code] Dim my_cmd As MySqlCommand my_cmd = New MySqlCommand() my_cmd.CommandText = "insert into documenttable values(route1,route2,route3,route4,route5,route6,route7,route8,route9,route10,route11,route12)" rs.Open(query, conn, ADODB.CursorTypeEnum.adOpenStatic, ADODB.LockTypeEnum.adLockOptimistic) my_cmd.Parameters.AddWithValue(rs("route1").Value, .ListBox1.Items(0)) my_cmd.Parameters.AddWithValue(rs("route2").Value, .ListBox1.Items(1)) my_cmd.Parameters.AddWithValue(rs("route3").Value, .ListBox1.Items(2)) my_cmd.Parameters.AddWithValue(rs("route4").Value, .ListBox1.Items(3)) my_cmd.Parameters.AddWithValue(rs("route5").Value, .ListBox1.Items(4)) my_cmd.Parameters.AddWithValue(rs("route6").Value, .ListBox1.Items(5)) my_cmd.Parameters.AddWithValue(rs("route7").Value, .ListBox1.Items(6)) my_cmd.Parameters.AddWithValue(rs("route8").Value, .ListBox1.Items(7)) …

Software Development vb.net
Member Avatar for kvprajapati
0
160
Member Avatar for MrJNV

If a user inputs a int number, say 150, how would I be able to read each individual number? i.e., I want to read the 1, do some things with it, then read the 5, and the next number...etc. Thanks

Software Development c++
Member Avatar for mrnutty
0
167
Member Avatar for musikluver4

Quick question. I have text in a JFormattedTextField, I clear it with a clear button to make it setText(""); and heres the problem: When I go back in the field, and just to test it, I just tab out or mouse click out of it without typing anything in it, …

Software Development java
Member Avatar for musikluver4
0
64
Member Avatar for Hand

If I want to throw an instance of a class, where should I alloc the exception object? Should I use heap: try{ throw new Exception("An error was found"); } catch(Exception* e){ std::cout << e->get_message() << "\n"; delete except; } or should not use heap: try{ throw Exception("An error was found"); …

Software Development c++
Member Avatar for mike_2000_17
0
133
Member Avatar for MasterGberry

Need to read 4 bytes into a long int format. Both inFileDrs and outFileDrs are in ios::binary form. Is this the correct way to do this? The original piece of code was [CODE]var tableCount = reader.ReadUInt32(); writer.Write(tableCount);[/CODE] [CODE] unsigned long int tableCount, firstFilePos; inFileDrs >> tableCount; outFileDrs << tableCount;[/CODE]

Software Development c++ ios
Member Avatar for MasterGberry
0
93
Member Avatar for woofers

I have written a client server program in which the server sends a program to the client, and the client executes the received program. In this case it is a line drawing program in OpenGL. The problem is that on running the server and client the whole program i.e. sending …

Software Development client-server opengl python
Member Avatar for woofers
0
147
Member Avatar for murtazamzk

[CODE]#include<graphics.h> #include<conio.h> #include<math.h> #include<dos.h> #include<stdio.h> void main() { int gd=DETECT,gm; int x=320,y=240,r=200,i,h,m,s,thetamin,thetasec; struct time t; char n[12][3]={"3","2","1","12","11","10","9","8","7","6","5","4"}; initgraph(&gd,&gm,"C:\\tc\\bgi");//ut the directory which containsegavga.bgi circle(x,y,210); setcolor(4); settextstyle(4,0,5); for(i=0;i<12;i++) { if(i!=3) outtextxy(x+(r-14)*cos(M_PI/6*i)-10,y-(r-14)*sin(M_PI/6*i)-26,n[i]); else outtextxy(x+(r-14)*cos(M_PI/6*i)-20,y-(r-14)*sin(M_PI/6*i)-26,n[i]); } gettime(&t); printf("The current time is: %2d:%02d:%02d.%02d",t.ti_hour, t.ti_min, t.ti_sec, t.ti_hund); while(!kbhit()) { setcolor(5); setfillstyle(1,5); circle(x,y,10); floodfill(x,y,5); gettime(&t); if(t.ti_min!=m) { …

Software Development c
Member Avatar for murtazamzk
0
152
Member Avatar for triumphost

The code below is what I'm having problems with... The combobox part is getting me angry and i've searched everywhere, code guru, msdn, stackoverflow, daniweb... And I cant figure it out. Its for a game my friend plays. I play and quit on and off.. I decided to do a …

Software Development api c c# c++ daniweb-bug
Member Avatar for jonsca
0
362
Member Avatar for Nandomo

Ok I am working on this program, I input the information it is supposed to pass it to the structures and then display, but its not there to display, and I know the information can't be missing since the math for the total which is done before displaying is done …

Software Development c++ data-structure
Member Avatar for mcriscolo
0
128
Member Avatar for lelejau

Hello, I have this code: [code] .data xd db "jjjj",0 .code ; ««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««« LibMain proc instance:DWORD,reason:DWORD,unused:DWORD .if reason == DLL_PROCESS_ATTACH push dword ptr ds:[ xd] call Teste mov eax, TRUE ; return TRUE so DLL will start .elseif reason == DLL_PROCESS_DETACH .elseif reason == DLL_THREAD_ATTACH .elseif reason == DLL_THREAD_DETACH .endif …

Software Development assembly
Member Avatar for GunnerInc
0
146
Member Avatar for Karl Luders

Hi, Everybody. I need to reload the form of my application. The application has only one form vb.net 2005. I need a button that will call the page_load event so I can restart and reload all my settings. basically I need to call the Sub private Page_load event(). I just …

Software Development vb.net
Member Avatar for kvprajapati
0
10K
Member Avatar for Niai123

The following program reads a specified file that contains a list of numbers. The program then prints: Sum, sum of the sqaures Mean, mean of the squares Standard Deviation A table of every number in the file with its difference from the mean and the quantity. A second table printing …

Software Development c
Member Avatar for Ancient Dragon
0
106
Member Avatar for sh4rif

Hello everyone Thanks for viewing this topic for me.... my question is when I tried to check user inputs a valid age it works only if a number is entered. If by mistake user inputs a character value (e.g. any character a to z or any symbol) this loop runs …

Software Development c
Member Avatar for sh4rif
0
322
Member Avatar for riiseuk

Hi there, I'm a bit of a newbie when it comes to C# and only had previous experience with Visual Basic. The problem i'm having revolves around a program I need to create too look at Students marks, the idea is the user inputs the marks and to end the …

Software Development visual-basic
Member Avatar for riiseuk
0
127
Member Avatar for Neversleepin

Hi, i'm trying to understand how actionPerformed is working. I'd like to know how to add more than one action in actionPerformed method. Here is an example of my code. I have two button b and c and the button b must open the gmail.com page. // this first action …

Software Development gui java open-source
Member Avatar for Neversleepin
0
230
Member Avatar for MasterGberry

So I have a few pieces of code that I want to implement into C++, and I think I understand what they are, but I want to check. I have been using an array of char[] to mimic the byte[] idea. So keep that in mind when helping with these …

Software Development c++
Member Avatar for MasterGberry
0
161
Member Avatar for hauda67

I am creating a desktop application that will also include a calculator, similar in function to the calculator of the Microsoft Windows OS. I require some assistance in implementing the memory capability such that the user can store a number, recall the number to be used in a calculation or …

Member Avatar for Ezzaral
0
215
Member Avatar for Evicake

Hello, I recently started writing a small program for reading multiple xls files from one directory. While reading one file like this,works perfectly: [CODE]wb = xlrd.open_workbook("C:\\path\\FileName.xls") sh = wb.sheet_by_index(0)[/CODE] this one doesn't: [CODE]os.chdir("C:\\path") for fileName in os.listdir("."): wb = xlrd.open_workbook(fileName) sh = wb.sheet_by_index(0)[/CODE] I keep getting the same error: [COLOR="Red"]XLRDError: …

Software Development python
Member Avatar for Evicake
0
378

The End.