43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for titaniumdecoy

Is there a difference, in terms of performance, between the two loops below? (myvec is type [icode]std::vector<int>[/icode].) [CODE]std::vector<int>::const_iterator pos; for (int i = 0; i < N; i++) { pos = myvec.begin(); // do something with pos }[/CODE] [CODE]for (int i = 0; i < N; i++) { std::vector<int>::const_iterator pos …

Software Development c++
Member Avatar for Narue
0
150
Member Avatar for tweak

I started this hangman game as a suggestion for beginners but now I am stuck. The code runs with out any errors but I need some way to put a certain amount of turns that the user can have but I am not sure how I could add this to …

Software Development python
Member Avatar for tweak
0
101
Member Avatar for VernonDozier

I'm trying to get my hands around Forms Painting in Visual C++, so I've created a Form, and on that Form I have added a Panel called cityPanel. I'd like to paint a green rectangle on it. I double clicked cityPanel, which resulted in Visual C++ creating this new function: …

Software Development c++
Member Avatar for VernonDozier
0
292
Member Avatar for flash121

Hello, I am wondering if it's possible to hide/show components on a form, depending on which radio button is selected. For example lets say i have two radio buttons (in a buttongroup) and two buttons. When i select the first radio button i want the first button to show, and …

Software Development java
Member Avatar for flash121
0
114
Member Avatar for Jennifer84

I have a problem to understand what I am doing wrong with this code. I have the string Line123. What I want to do is to make the output of this string to look like: "Number1> Number2 Hello Number1> Number2" So what I did is to take all blancspaces away …

Software Development c++
Member Avatar for Jennifer84
0
83
Member Avatar for 13L4D3

Well i am a starter in programming and need ur help. M using older version of borland c++ for programming. M trying to make a program which adds users login and password information and also verifies the correct login and password by accessing the contents of those files. but there …

Software Development c++ ios
Member Avatar for 13L4D3
0
184
Member Avatar for Bill Purkins

Hi, I am new to VB 2008 and am trying to add a tableadapter to my app. I get as far as creating the tableadapter but when I try to add a column to the table I get an error message TABLE DOES NOT EXIST. Thanks in advance, Bill P.

Software Development vb.net
Member Avatar for Bill Purkins
0
82
Member Avatar for pkollmyr

I am currently working on sending a file that contains one or more sentences through a parser, using command prompt. C:\ exe argument1 file is the format it must be sent it in command prompt The parser works and will return the parsed sentences in the command prompt ranging from …

Software Development java
Member Avatar for pkollmyr
0
126
Member Avatar for k2k

this is a done version of the previous thread. it concatenate all the arguments if they are not the same... however some case will make it a:a:b:a:b:c i try to change all the : into space and then uniq them out.... but the uniq is not working this way i …

Software Development shell-scripting
Member Avatar for k2k
0
125
Member Avatar for raul15791

Hi, I try to compare items in two different arrays. This loop works well in another program of mine. But not in the current program i'm working on. Weird.... The output of the program shows [ICODE] Nested quantifiers in regex; marked by <-- HERE........ [/ICODE] [CODE=PERL] for $3 (@obsolete_class_declare) { …

Software Development perl regex
Member Avatar for raul15791
0
142
Member Avatar for Evan M

I have a header file causing me several errors. It contains a class definition, then I have a *.cpp file with the function definitions. Header: [CODE]#ifndef DOT_H #define DOT_H #include "SDL/SDL.h" #include <vector> class Dot { private: int x, y; int xVel, yVel; vector<SDL_Rect> box; bool check_collision( vector<SDL_Rect> &A, vector<SDL_Rect> …

Software Development c++ visual-studio
Member Avatar for Evan M
0
521
Member Avatar for Q8iEnG

Hi guys :) I'm just wondering how to start doing this problem? Converting from Infix notation to Postfix one (Pastfix Calculator) Of course in C++ using stack! Any Idea how to implement the code? thanks :)

Software Development c++
Member Avatar for Q8iEnG
0
149
Member Avatar for wtf???

could someone show me how to read more then 1 line of text in a file and print it on the screen im kinda new at this tho i no how to do 1 line using namespace std; [CODE]int main() { system("COLOR 5"); system("TITLE tempature converter"); double dfirstNumber, danswer, firstNumber, …

Software Development c++ ios
Member Avatar for Narue
0
87
Member Avatar for Scuppery

Hey there everyone I need a little help. Right now I am in the process of writing a program that uses subscripts and superscript but I dont have a clue how to get them. I am not even sure if they can be used in python so if any of …

Software Development python
Member Avatar for jrcagle
0
5K
Member Avatar for wtf???

im new with c++ and dont know much but want to save the answer to the program i made when i do it names the file ÿÿÿÿ also the type of file is just called file how can i make it like .txt or somthing also just ignore the useless …

Software Development c++ ios
Member Avatar for wtf???
0
206
Member Avatar for Jennifer84

I have Created a Form1. On this Form I have a button that opens Form2 like this: [code] Form2 ^form2 = gcnew Form2; form2->Show(); [/code] Now if I click on Form1, Form2 will "dissapear" under Form1. What I wonder is, if it is possible to click on Form1, but stil,l …

Software Development c++
Member Avatar for Jennifer84
0
123
Member Avatar for wtf???

i spent a long time trying to fix this probably somthing stupid but please help me. i dont see any problem but its probably somthing stupid. it compiles ok and when i run it it works until i get to the equations it prints somthing like 1.62111e-307 here is my …

Software Development c++ ios
Member Avatar for wtf???
0
116
Member Avatar for Agni

[code=c++] #include <iostream> using namespace std; class Lock { friend class First; private: Lock() { } }; class First : virtual public Lock { public: void function() { cout << "function1" << endl; } }; class Second: public First { public: void function2() { cout << "function2" << endl; } …

Software Development c++
Member Avatar for ash05
0
161
Member Avatar for FTProtocol

Just thought id post here while i search google at the same time because well two brains are better than one :) The Asc function converts the first letter in a string to ANSI code, and returns the result. Syntax Asc(string) Thats the VB version of it, i need something …

Software Development c++
Member Avatar for hacker9801
0
214
Member Avatar for FTProtocol

[CODE]Linking... Main.obj : error LNK2001: unresolved external symbol "int __cdecl ConvertANSI(char)" (?ConvertANSI@@YAHD@Z) Debug/szStub.exe : fatal error LNK1120: 1 unresolved externals[/CODE] Defined: [CODE]#include <windows.h> #include <math.h> #include <iostream> using namespace std; int ConvertANSI(char sChar); [/CODE] Function: [CODE]// Credits to Dave int ConvertANSI(char szText[]) { return static_cast<int>(szText[0]); }[/CODE] Usage: [code] if(ConvertANSI(szChar) >= …

Software Development c++
Member Avatar for mitrmkar
0
85
Member Avatar for FTProtocol

I completely rewrote the Stub i was writing because my VB -> C++ was shocking. VB Version: [code=vb] Public Function TempPath() As String Dim WindirS As String * 255 Dim TEMP TEMP = GetTempPath(255, WindirS) TempPath = Left(WindirS, TEMP) End Function [/code] The Left function returns a specified number of …

Software Development c++ visual-studio
Member Avatar for FTProtocol
0
89
Member Avatar for kdw3

Hi, I am trying to use a 2D array to gather information from a dialogue box. The array has been publicly dimensioned in a module. Before the dialogue box is opened, there is data in the array, and thats fine, but as soon as soon as the dialogue box is …

Software Development vb.net
Member Avatar for kdw3
0
124
Member Avatar for java_girl

Hi. Objective: Write a program that declares a 12*12 array of characters. Place Xs in every other element. Use a pointer to the array to print the values to the screen in a grid format. Listed below is my non-functional attempt. Any help would be most appreciated. Thanks, Molly [CODE=C] …

Software Development c objective-c
Member Avatar for Dave Sinkula
0
123
Member Avatar for veledrom

Hi, I set DataGrid1 column width as follows, but it doesn't effect when i run my program. [code] DataGrid1.Columns(0).Width = 3030.236 DataGrid1.Columns(1).Width = 1604.976 DataGrid1.Columns(2).Width = 1904.882 DataGrid1.Columns(3).Width = 1065.26 [/code] Thanks

Software Development visual-basic
Member Avatar for veledrom
0
111
Member Avatar for k2k

I try to simply concat the arguments if they are not the same..... what is wrong with this simple code for concat??? [CODE] #!/bin/sh result=$1 shift while [ "$#" -ne "0" ] do next=$1 if [ $result = $next ] then : else $result="$result $next" fi shift done echo "$result"[/CODE] …

Software Development shell-scripting
Member Avatar for omrsafetyo
0
87
Member Avatar for licruzny

Please help with the following linked list program. Any help is good =] Use a linked list to do this program a store recieves shipmesnts of chairs at various cost. the store policy is to charge a 35% markup, and to sell chairs which were received earlier before chairs that …

Software Development c++ linked-list promotion
Member Avatar for licruzny
0
163
Member Avatar for anuizath2007

Does anybody know how to this question.... An election is contested by 5 candidates.They are numbered 1-5 and the voting is done by marking the candidate no on the ballot paper. Writea program to read the ballots and count the votes cast for each candidate using an array variable count.In …

Software Development c++
Member Avatar for anuizath2007
0
292
Member Avatar for twburkle

My program currently takes three inputs from the user ( Wage, Hours, Tips ), then it calculates the gross income. Im brushing up on my c++ and Im not sure what functions I need to look for, but I know what I want to do. 1. I would like to …

Software Development c++
Member Avatar for twburkle
0
129
Member Avatar for cheesedoodle

I started trying to teach myself how to program in python just a few days ago. I have been using a wikibook for non programmers and it has this piece of code as an example. I CAN NOT for the life of me figure out why it outputs the value …

Software Development python
Member Avatar for vegaseat
0
133
Member Avatar for TheOneElectroni

Hi everyone, I have a problem to insert text into a text widget in Tkinter. I want to be able that each time some text is inserted (by means of an action -not directly by the user-) that text is displayed into a new line. However I can't figure out …

Software Development python tkinter
Member Avatar for TheOneElectroni
0
4K
Member Avatar for 010Nick

Hi I have been writing VB.Net for a few weeks, it has been going well but I am now stuck. I have multiple user controls on a form and I need a way to remove a selected one. I was hoping that something like this would do it [code] Private …

Software Development vb.net
Member Avatar for 010Nick
0
204
Member Avatar for QuantNeeds

Hello, The following code works but I am having trouble formatting it with setw() and I am not sure if it possible to format it with a space so that the entire seat header fits on one line and for the rows to also fit on one line with spaces. …

Software Development c++
Member Avatar for Nick Evan
0
111
Member Avatar for risa

String functions like strcpy,strcat,itoa...shows warning as "declared deprecated" in Visual Studio 8.0 instead it suggests to use functions which are enhanced secure versions of the same such as strcpy_s,strcat_s,_itoa_s.....using this in my file removes those warnings but i am using this same file in visual studio 6.0 here it gives …

Software Development c++ visual-studio
Member Avatar for risa
0
3K
Member Avatar for manojthanal

I am started a new with VB6 Access project. I am connected database with ADODB, DSN Method that Code Given below. '======================In module ============== '=================== Connection With Database =============== '====================================================== Public CNN As New ADODB.Connection Public RS As New ADODB.Recordset Public cString As String Public Sub Main() Set CNN = …

Member Avatar for manojthanal
0
393
Member Avatar for novadose

First off i would like to say i am very new to vb, i am using vb 2008 express edition and while making a web browser (which is supposed to be one of the easiest things to do), i decided to some image links to some of my favorite sites, …

Software Development vb.net web-browser
Member Avatar for novadose
0
86
Member Avatar for QuantNeeds

Help I am having the following error: error C2446: '==' : no conversion from 'int' to 'char *' When I tried the following it ignores my counter and I am not sure why. This is a serious problem because it creates and infinite loop that keeps printing. [code] if(char(seating[openSeat + …

Software Development c++
Member Avatar for Duoas
0
3K
Member Avatar for QuantNeeds

Please help – I am having either some logic issues or formatting issues: My code is the following: [code] #include <iostream> using std::cout; using std::cin; using std::endl; #include <iomanip> using std::setw; using std::setprecision; #include <cstdlib> // contains prototypes for functions srand and rand using std::rand; using std::srand; #include <ctime> // …

Software Development c++
Member Avatar for QuantNeeds
0
98
Member Avatar for titaniumdecoy

The default copy constructor should work for the Polynomial class below because it does not contain any dynamic data types. However, when I create a new Polynomial via the copy constructor, it prints 0 for the value of each coefficient. How can I fix this? [CODE]#include <iostream> #include <vector> class …

Software Development c++
Member Avatar for Duoas
0
141
Member Avatar for hacker9801

Hey. What's better, i++ or ++i? Well ++i returns the value after it's incremented, but which is faster? (not necessarily for int, user-defined types with operator++ overloaded too.)

Software Development c++
Member Avatar for hacker9801
0
115
Member Avatar for kasunc

hello pals, I need a help with using re module to search and convert uppercase words in a string to title case Eg: [code] mystr='Hello everybody. Some times THERE ARE upper case words' #Results should be 'Hello everybody. Some times There Are upper case words' [/code] Hope you can give …

Software Development python regex
Member Avatar for kasunc
0
296
Member Avatar for wrappingduke

Hello, i'm attempting to create a splash screen using the code snippet posted on this site(i.e. DaniWeb) - [URL="http://www.daniweb.com/code/snippet697.html"]http://http://www.daniweb.com/code/snippet697.html[/URL] However, I'm having some difficulty. It appears that the splash screen will continue to run w/out disposing itself. That is, the screen hangs and does not go away. Also, the screen …

Software Development java
Member Avatar for wrappingduke
0
145
Member Avatar for harcaype

I'm trying to update/refresh my data grid but it doesn't seem to update whenever there's a new entry. I've search the net about it and they were talking about databind(). I can't seem to have that in my datagrid. My intellisense only shows DataBindings not databind(). here's my code (when …

Software Development
Member Avatar for harcaype
0
116
Member Avatar for Software guy

hi , i have a simple problem here, that is how can i convert an Decimal integer into Hexadecimal integer and not in Hexadecimal string. I have wrote the following code and managed to get the output from the program. But for a certain reason i cant use it again …

Software Development java
Member Avatar for Software guy
0
183
Member Avatar for bhoot_jb

i think it is not possible to print vertical lines along with text data in vb6..so i thot of transferring the whole contents from vb form to a word document. but now i dont know how to do that. i want to transfer the data in a specific tabular format. …

Software Development visual-basic
Member Avatar for bhoot_jb
0
180
Member Avatar for veledrom

Hi, I have a subroutine(callMe) in Module1. I want to call "callMe" in other subroutine in Form1. I cant do it. I cant call subroutine in other subroutine. How do i do it. Thanks

Software Development visual-basic
Member Avatar for QVeen72
0
354
Member Avatar for Mazille

Hi I'm a python beginner! I'm trying to make a list of 3 numbers per line but I get an error. =( Here's my code: [CODE=python]list2 = [23, 764, 12, 54, 83, 2, 543, 890, 1235, 453, 98] k = 0 while list2[k] != -1: first = str(list2[k]) k = …

Software Development python
Member Avatar for Mazille
0
1K
Member Avatar for QuantNeeds

Is it possible to store * and # in an array? I thought I could do this through the data type char. On top of that I was wondering if I could check the array elements to see if the element equaled that character, but I don't think that's possible. …

Software Development c++
Member Avatar for QuantNeeds
0
76
Member Avatar for reniies

Hi all, I've developed a vb.net application for a desktop digital clock and deployed it. I made the application start at windows startup and it's working fine. But the taskbar button for the application is there in the taskbar every time the windows login. Please help me to modify the …

Software Development vb.net
Member Avatar for reniies
0
267
Member Avatar for ferzan

Hello, I'm embarrassed for asking this question but for the life of me I cannot find an answer. This ultra simple code is giving this error as well as any other function that I'm trying to write. [CODE]a function-definition is not allowed here before '{' token expected `,' or `;' …

Software Development c++
Member Avatar for ferzan
0
145
Member Avatar for HLA91

Hey all I recently picked up the book "Java the first semester". It uses the EasyIn class to get user input. I have downloaded the file EasyIn.java but I dont know how to make the class accessible from my programs. [QUOTE]As long as the EasyIn class is accessible you can …

Software Development java
Member Avatar for peter_budo
0
186

The End.