132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for sampsont

I want to re-use a vector<short> over and over in a performance critical loop. I only need the vector **size** to be reset to zero at the end of the loop. I'm worried that the myVector.clear() takes time to actually clear all the memory. Also, does the myVector.reserve() survive the …

Software Development c++
Member Avatar for sampsont
0
810
Member Avatar for CharlieBrook

int main(void) { char faceValue[2]; char suitValue[2]; //User enters the value of their hole cards. setCardFaceValue(faceValue); setCardSuitValue(suitValue); for(int i=0;i<2;i++) printf("Element %i: %c %c\n",i,faceValue[i],suitValue[i]); return 0; } void setCardFaceValue(char* face) { char card[2][20] = {"left card:","right card:"}; for(int i=0;i<2;i++) { printf("Enter face value for "); for(int x=0;x<19;x++) { printf("%c",card[i][x]); if(card[i][x] == …

Software Development c
Member Avatar for Ancient Dragon
0
240
Member Avatar for anilchuthur

i havae problem java connection with sql server 2005 in windows authentication mode my code is as follows Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); Connection connection = DriverManager .getConnection("jdbc:sqlserver://localhost:1433;database=dbName;integratedSecurity=true;");

Software Development java sql
Member Avatar for anilchuthur
0
329
Member Avatar for raviaaaa

HI All i am new to java jdk 1.4 and tomcat 4 my requirement is id desc name firstname lastname 1 hi ravi m last 1 hi ravi m middle 1 hi ravi m mapp 2 hi kiran ha hey 3 hi vinoth hello yes id is ----id desc name …

Software Development java
Member Avatar for JamesCherrill
0
409
Member Avatar for Albino

Errors: 1>main.cpp(9): error C2143: syntax error : missing ')' before 'constant' 1>main.cpp(9): error C2143: syntax error : missing ';' before 'constant' 1>main.cpp(9): error C2059: syntax error : ')' 1>main.cpp(63): error C2660: 'checker' : function does not take 9 arguments 1>main.cpp(71): error C2143: syntax error : missing ')' before 'constant' 1>main.cpp(71): …

Software Development c++
Member Avatar for Albino
0
367
Member Avatar for jackmaverick1

During the process of creating my latest game, I've come across the problem of collisions. In the last few games I've made, I've used a system of collision detection that relyed on two rectangle's methods. This seems to work, but doesn't provide a method for dissallowing an entity entry into …

Software Development java
Member Avatar for jackmaverick1
0
214
Member Avatar for SAM2012

Hi, I need help in designing a function that would model the arrival of the messages in the queue following poisson distribution. I shall be grateful for this kind help.

Software Development c++ queue
Member Avatar for SAM2012
0
183
Member Avatar for KY_Fan

I have tried to figure this out on my own forever now. I have been getting hint from the net but can't figure it out. So I figured I would admit defeat and see what you guys could show me. I need the three numbers entered into this program to …

Software Development python
Member Avatar for sneekula
0
201
Member Avatar for warpstar

Can someone explain the code below? Is .next an operator in java that pushes the pointer to the next node in the linked list? Node E < -- type node? public E dequeue ( ) throws EmptyQueueException { if (isEmpty ( )) { throw new EmptyQueueException (”Queue under flow”) ; …

Software Development java linked-list queue
Member Avatar for warpstar
0
146
Member Avatar for shaanmugavel

I have finished my deployment process for my project in vb.net,but i didn't know how to protect my project. I request you to please tell me the way of serial key setting while installing my project in clients system. Also i have to faced one problem while serial key setting, …

Software Development vb.net
Member Avatar for Reverend Jim
0
228
Member Avatar for danielgek

hi im studing on i have this work and its giving me this error: main.c||In function 'get_jogos':| main.c|75|warning: implicit declaration of function 'get_endereco'| main.c|75|warning: assignment makes pointer from integer without a cast| main.c|76|warning: assignment makes pointer from integer without a cast| main.c|122|error: conflicting types for 'get_endereco'| main.c|75|note: previous implicit declaration …

Software Development c
Member Avatar for danielgek
0
247
Member Avatar for triumphost

Yesterday I took a dive into smart pointers and wasn't sure when I should use them vs. Raw pointers. I found out they are quite useful but they do not work all the time for me. Example of working: char* Buffer = new char[1024]; fread(buffer, 1, sizeof(buffer), infile); //took out …

Software Development c++
Member Avatar for mike_2000_17
0
234
Member Avatar for reenarankawat

/* Reena Rankawat */ #include<iostream.h> #include<conio.h> void main(void) { char name[50],ch[11]; int x; clrscr(); do { x=0; cout<<"\n Welcome to KBC"; cout<<"\n\n Enter your name: "; cin>>name; cout<<"\n Enter answer in form of 'a','b' and'c'only."; cout<<"\n Q1.What is called as ' THE HOLY LAND'?"; cout<<"\n a.Jerusalem"; cout<<"\n b.Mathura"; cout<<"\n c.Mecca"; …

Software Development c++
Member Avatar for Schol-R-LEA
0
6K
Member Avatar for DanCuster

Hello everyone, I am building a tic-tac-toe game for my final and everything is going smoothly except for one problem. The names I ask the user to enter at the beginning of the game, a replaced with null when the messagebox that shows who won appears. Here is the code, …

Software Development java java-swing
Member Avatar for JamesCherrill
0
641
Member Avatar for shiushiu

need help in this work .... goal This work is to develop a system capable of managing bank accounts. description The banking system consists of a set of two banks where each bank has a manager, responsible for the accounts of that bank. Also part of the banking customers (maximum …

Software Development c
Member Avatar for Schol-R-LEA
0
153
Member Avatar for king03

Okay so I am having a problem with my program, because everytime I run my program and login a registered username and password, these username and password are accepted by the program but once you try to save your schedule, and logout, the next time you login that username and …

Software Development
Member Avatar for james6754
0
334
Member Avatar for hasan101002

i want some idea about method hiding

Software Development
Member Avatar for hasan101002
0
104
Member Avatar for SummerNight

Hi, How do I programatically find the GUID for the Sharepoint List **View** given that the name of the view is known. A user has to input the view name and the program should be able to spit out its GUID. Thanks.

Software Development c c# c++ sharepoint
Member Avatar for SummerNight
0
190
Member Avatar for DeanMSands3

tl;dr: I think my code sucks. Can you help me? I haven't written a test case for this class yet, but I want to make sure I'm doing it right before I go home tonight. The gist of the class is to provide a reusable ImagePrinter object that can print …

Software Development html-css image printer
Member Avatar for DeanMSands3
0
229
Member Avatar for srg85

I have a data set in .txt format and want to do some arithmetic operation on the data set using C code. How to do the job? I want to make the text data into a 2D-array. The data set is like this: 1st col - year, 2nd col-January rainfall, …

Software Development c
Member Avatar for mridul.ahuja
0
2K
Member Avatar for tomtetlaw

I appolagise for the slightly ambiguous title, I didn't know what to call it. I want to create a way to define interfaces without having to also write the class declaration that implements it. I have the class members, and the interface defined, but I am not sure how (if …

Software Development c++
Member Avatar for tomtetlaw
0
167
Member Avatar for joejo

*hello, *Please, i would like some help with how to start with my FINAL YEAR project work dubbed "SCHOOL TRACKING SYSTEM" . I am so much lost on how it shoud be like and what to actually do . Some support would be very much appreciated and am so much …

Software Development vb.net
Member Avatar for joejo
0
198
Member Avatar for nee_88

Hi, I have a doubt. Suppose we define a pointer or an array of pointers, and pass it to a function, as in like :- char *p; func(p); /*or this way*/ char *p[10]; /*and then pass this array somewhere to a fucntion*/ func(p); Here, in the call to the function, …

Software Development c
Member Avatar for deceptikon
0
119
Member Avatar for icefreezer7

Hi I started graphics programming only recently so im still a beginner at it. I've tried a snippet from online for c++ and I always get the same error message, Cannot open include file: 'stdafx.h': No such file, please help because Ive looked around this forum and I cant understand …

Software Development c++
Member Avatar for Lucaci Andrew
0
419
Member Avatar for kim_boto

Hello Everyone,,please help me out here.i have a problem whicn needs to be solved.. i'm creating a windows form using C# visual studio 2005 and my database is SQL Server 2005..i have a Login table inside my database. the login windows works fine.however i need a form which will let …

Software Development visual-studio
Member Avatar for kim_boto
0
175
Member Avatar for 330xi

Hi! I have a Moniker from ROT and I have an "empty" _ApplicationPtr variable. How Can I have in _ApplicationPtr var a process by Moniker.

Software Development c++
Member Avatar for 330xi
0
82
Member Avatar for Webbsta

Hello! I have a problem with my C# Client/Server network program. This problem only occurs when connecting via an IP over the internet, whereas everything works fine using a local address (127.0.0.1). What happens is while transferring a file (10kb or more maybe) using the below code, my receiving program …

Software Development c c# c++ client-server
Member Avatar for Webbsta
0
297
Member Avatar for ido098

I'm trying to write a video streamer using Socket and ImageGrab modules in Python. so far I've got a streamer that can send pictures of the desktop from one computer to another over a TCP connection, but as you probably can guess, the frame rate is very low so what's …

Software Development python video
Member Avatar for TrustyTony
0
138
Member Avatar for testingcore99

Hello I am getting this error: error: expected '=',',',';', 'asm' or '__attribute__' before '.' token I am not sure what is causing it, it's probably something stupid which I have over looked, here is the problem code. This is a mac app btw DataClass *obj=[DataClass getInstance]; obj.str= @"test";

Software Development objective-c
Member Avatar for testingcore99
0
1K
Member Avatar for Sendy Hipo

hi, i have problems with static member function the compiler's problems = "undefined reference" **Design a class Numbers that can be used to translate whole dollar amounts in the range 0 through 9999 into an English description of the number. For example, the number 713 would be translated into the …

Software Development c++ ios
Member Avatar for Sendy Hipo
0
712
Member Avatar for nuclear

I'm using the Guichan lib and I was trying to run the "First application with Guichan, OpenGL and SDL" example, which is located here [Click Here](http://guichan.sourceforge.net/oldsite/getting-started.shtml) . Everything was fine exept when I exit the program and delete all the pointers which were allocated with the "new" and because of …

Software Development c++ file-system opengl
Member Avatar for Lucaci Andrew
0
165
Member Avatar for nikki05

Hi, I am able to delete the data from database. My Problem is how to delete a file from the folder that is linked to the database using c#, asp.net. Below is my code snippet for your reference. I would greatly appreciate your help/suggestion. Thank you. protected void lnkdelete_Click(object sender, …

Software Development asp.net
Member Avatar for Mitja Bonca
0
318
Member Avatar for toluwanimibosun

could you help write a c++ program da allows 10 players to play the game of dice and displaying the winner with highest score

Software Development c++
Member Avatar for Lucaci Andrew
0
115
Member Avatar for poloblue

Good Afternoon, I'm having trouble with loops that deal with enumeration. So far I have this code #include <iostream> #include <fstream> #include <string> #include <cstring> #include <cmath> #include <cstdlib> #include <iomanip> using namespace std; int main( ) { //enumerate type definition enum weekDays {Monday, Tuesday, Wednesday, Thursday, Friday, Saturday,Sunday}; //variable …

Software Development c++
Member Avatar for Lucaci Andrew
0
302
Member Avatar for triumphost

Why does this say shaddowing? If I change my member X and Y to `_X, _Y` then when I access my class via the dot operator, it shows FOUR values.. Current Class: class Point { public: int X, Y; Point(int X, int Y); ~Point(); }; Point::Point(int X, int Y) : …

Software Development c++
Member Avatar for triumphost
0
127
Member Avatar for priyadarshana

Hello, I am working on desktop application. I had created number of dynamic textbox and label and I want to save that data on clicking the save button. If any question, if you did not get my point clear than please ask. Its urgent. Please Help!!! Please give me suggestion …

Software Development vb.net
Member Avatar for CurtisUN
0
606
Member Avatar for Stuugie

I would like to invoke a click on a link from a link that is generated by an HTML query. I am attempting to program an application that queries a website and am getting hung up where I download the .csv that is loaded by the website. Here is the …

Software Development html-css vb.net
Member Avatar for Stuugie
0
274
Member Avatar for JE821

So the program makes an inventory from a cvs file. The cvs file consists of dvds and books. here is the code: #include "StdAfx.h" #define _CRTDBG_MAP_ALLOC //for memory checking #include <iostream> #include <stdlib.h> #include <crtdbg.h> #include <iomanip> #include <fstream> #include <string.h> #pragma warning(disable: 4996 4018) using namespace std; #define COPYSTR(TARGET, …

Software Development c++ ios open-source
Member Avatar for JE821
0
402
Member Avatar for triumphost

I'm trying to figure out why I should convert all my unsigned ints/shorts to size_t. I'm doing the things below but I'm not sure which one to use and which type to iterator my for-loop with: unsigned short Size() { return vector.size(); } int Size() { return vector.size(); } unsigned …

Software Development c++
Member Avatar for triumphost
0
204
Member Avatar for idomarko

hey! i need a quick answer.... how can i move the letters so that they will start from right to left and ***not*** from left to right? i writing in hebrew and i looks weird if it start from left to write! for example: that how it should start: שלום …

Software Development visual-basic
Member Avatar for ChrisPadgham
0
319
Member Avatar for harsh01ajmera

How can i check or see the print preview of datagridview where my file is an access file and pls give me sample code.

Software Development vb.net
Member Avatar for CurtisUN
0
216
Member Avatar for SolTec

Is there a way by naming convention say for example to clear all textboxes with a "txt" name prefix in a form that has multiple textboxes? Or, am I going to have to name each textbox individually and use either "" or string.empty? Thank you in advance for any and …

Software Development vb.net
Member Avatar for Pie46
0
9K
Member Avatar for abrarsyed

Hello frnds. I want to knw tht how can we send an array by value in c.

Software Development c
Member Avatar for Trentacle
0
225
Member Avatar for Diamonddrake

A couple of months ago I had wanted to keep a form active as long as it was visible, I couldn't find any help with this, a couple of forums led me into the dirt, as everything they suggested failed. I decided against the feature, but not before I found …

Software Development
Member Avatar for chrisrmead
0
3K
Member Avatar for valestrom

I can't figure out how to convert my int value back to a string for use in a textbox. I already pulled it out converted it to int, did the equation now I just want to flip it back to display in a textbox. private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) …

Software Development c++
Member Avatar for valestrom
0
3K
Member Avatar for pythonbegginer

I have a text file named "multipoles.txt", i took a screen shot of it ( [url]http://img193.imageshack.us/i/textf.jpg/[/url]) so i can explain myself better. Ok so I basically want to go in the file and get the data from the third column below the text that says Electronic Charge Electrons. The numbers …

Software Development file-system python
Member Avatar for snippsat
0
6K
Member Avatar for sanket044

SELECT sum(GoodsRcpt.PurchQty) FROM GoodsRcpt where GoodsRcpt.GlsClr=" WHITE"; SELECT count(Prescriptions.SrNo)/2 FROM Prescriptions where Prescriptions.GlsClr=" WHITE"; SELECT sum(GlassDamage.DamageQty) FROM GlassDamage where GlassDamage.GlsClr=" WHITE"; Combine above three query and the equetion should be like, (result of query1) - ( result of query 2 + result of query 3) its urgent... Thank you....

Software Development vb.net
Member Avatar for sanket044
0
110
Member Avatar for malsmit2014

package furniture; import java.io.*; import java.util.*; public class Program3 { public static void main(String[] args) { //array of 10 Furniture object references String[] furniture = new String[10]; String filename = "furnitureData.txt"; Scanner input = null; try{ input = new Scanner(new File(filename)); }//end try catch(FileNotFoundException e){ System.err.println(e); System.exit(1); }//end catch }//end …

Software Development file-system java
Member Avatar for DavidKroukamp
0
307
Member Avatar for tudorH

Hi, So this is my first time creating a web service and I am a bit stuck. This is the code I have used for my web service: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Services; using System.Web.Services.Protocols; using System.Data; using System.Data.SqlClient; [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] …

Software Development c c# c++ visual-studio
Member Avatar for advisor999
0
245
Member Avatar for shibu2all

i am unable to understand the code. can anyone please explain. printf("%d",i & 1) wat is the &1?? int i; for(i=0;i<10;++i) printf("%d",i &1);

Software Development c c# c++
Member Avatar for shibu2all
0
116

The End.