64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for MasterHacker110

I have this C++ network client program but it has an error. Here is the error: error C2664: 'wsprintfW' : cannot convert parameter 1 from 'char [128]' to 'LPWSTR' Here is the code: // Client program example #define WIN32_LEAN_AND_MEAN #include <winsock2.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #define DEFAULT_PORT 2007 …

Member Avatar for mitrmkar
0
318
Member Avatar for tonyprotop

I am new in Perl and generally in programming. I face some real problems here. I need a Perl script that can open a text file, read a series of URLs, get the content of the pages and save it to another file. Thanks deeply for any guidance.

Member Avatar for tonyprotop
0
179
Member Avatar for LastMitch

Hi I have a question regarding **Ascending Order** and **Descending Order**. I want to learn how to write a **Ascending Order** and **Descending Order** on any list. For example: I want to create a booklist and I want to organized it by a library code system. **Category**----**ID**-----**Arthur** History-------123----Scholastic Art------------456----Da Vinci …

Member Avatar for diafol
1
4K
Member Avatar for blueyan

[Click Here](http://img196.imageshack.us/img196/3873/captureiv.jpg) for the snapshot of my problem. string operand; string opCode; struct MacroNameTable{ string macroName; int start; int end; int invocation; string operandCounter; }; struct MacroNameTable NAMTAB[NAMSize]; void addNAMTab(){ NAMcounter++; cout <<"check NAMcounter: ["<<NAMcounter<<"]"<<endl;//debug cout <<"check this operand: ["<<operand<<"]"<<endl;//debug cout <<"check this opCode: ["<<opCode<<"]"<<endl;//debug NAMTAB[NAMcounter].macroName=opCode; NAMTAB[NAMcounter].start=DEFcounter; NAMTAB[NAMcounter].operandCounter="AA"; } operand …

Member Avatar for blueyan
0
134
Member Avatar for Sunshine2011

#include <iostream> #include <vector> #include <iterator> using namespace std; class members { private: int Age; int Money; public: void setAge(int age) {Age=age;} void setMoney(int money) {Money=money;} int getAge()const {return Age;} int getMoney()const {return Money;} members(int age=0,int money=0): Age(age),Money(money) {} }; int main() { vector<members>v_members; for(size_t i=0,z=0;i<10;++i,++z) { if(z!=5) { v_members.push_back(members(50,70)); …

Member Avatar for Sunshine2011
0
237
Member Avatar for Jamblaster

I can't tell why this piece of code wont work, but another one which I wrote does because they look exactly the same to me. Please tell me if you can see what the difference is because I cannot. I tried using the code snippet thing, but it doesn't let …

Member Avatar for Jamblaster
0
211
Member Avatar for MasterHacker110

When i compile my code with visual studio 2010 express i get the following errors: 'Client.exe': Unloaded 'C:\Windows\SysWOW64\WSHTCPIP.DLL' And with the other program i get these: 'Server.exe': Loaded 'C:\Users\User\Desktop\Server\Debug\Server.exe', Symbols loaded. 'Server.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file 'Server.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB …

0
78
Member Avatar for Sendy Hipo

Hello, im a bit new to c++ and learning in my own, but im stuck to a problem. Im trying to do a practice converting string/c-string to int : Sum of Digits in a String Write a program that asks the user to enter a series of single digit numbers …

Member Avatar for Sendy Hipo
0
549
Member Avatar for showman13

Could someone tell me how to extract the right most single digit from a number without knowing the length of the number? 123 I need the 3 386485 I need the 5 etc... Seems it should be simple, but been searching for over an hour and can't find the resolution... …

Member Avatar for cereal
0
92
Member Avatar for MasterHacker110

Why do i have to include stdafx.h everytime in visual C++ 2010 express. Evertime i make a project i have to include that damn header, whats so special about it and how can i avoid including it and still compile my program. I have tried to leave it out but …

Member Avatar for MasterHacker110
0
576
Member Avatar for Octet

I am attempting to create a script which checks to see if the user has a warning level of less than 3. Basicaly, I want to automatically deny any account which has a Warning Level (stored in the Database) of 3 or more from logging in but whenever I attempt …

Member Avatar for Octet
0
166
Member Avatar for rogerg

hello, I use a script I found on this site [Click Here](http://www.html-form-guide.com). I don't think the htmlentities check work and I don't know what's wrong. the .php file for the registration starts with <?PHP require_once("./include/membersite_config.php"); if(isset($_POST['submitted'])) { if($fgmembersite->RegisterUser()) { $fgmembersite->RedirectToURL("thank-you.php"); } } ?> and the user registration form starts with …

Member Avatar for rogerg
0
203
Member Avatar for sundog1

Hi guys, I have an issue with the code I've written in C# where the listview will connect to the database without a problem but it will only populate the 1st row of the table BUT.... it will duplicate it for the exact amount of records I am expecting to …

Member Avatar for sundog1
0
153
Member Avatar for sundog1

Hi guys, I'm new the this forum where I'm hoping to get some friendly advice for a bit-of-a-newbie C# programmer. I've been through 2 differnt beginners courses on the code so now i'm ready to get my hands in the code! I'm currently having a problem with loading all data …

Member Avatar for sundog1
0
173
Member Avatar for 330xi

I have this error in atlimage.h line 1568 while trying to save picture. In release mode everything is "fine" but no new file appears. Here is the code: CClientDC dc(this); CDC dcMem; CBitmap m_bmpBack; GetClientRect(&rc); hBmp = LoadImage(NULL,name,IMAGE_BITMAP,0,0,LR_LOADFROMFILE); GetObject ( hBmp, sizeof(bm), &bm ); m_bmpBack.Attach(hBmp); dcMem.CreateCompatibleDC(&dc); hbmpOld = (HBITMAP)dcMem.SelectObject(m_bmpBack); //hToSave …

Member Avatar for 330xi
0
432
Member Avatar for ehpratah

**Hi guys** I’m new to this site and i really need a professional help out here. I am trying to make a search form in my page and basically i can search my database already but i need to revised the code because the process of my **search form depends …

Member Avatar for neatric
0
8K
Member Avatar for nikita.

CONFIG_FILE="${HOME}/sample/seq.cfg" count=`awk 'END {print NR}' $CONFIG_FILE` echo $count t=1 while [ "$t" -le "$count" ] do output_var=`awk -v v1=$t '$1 ~ /v1/ { print $1 }' $CONFIG_FILE` input_var=`awk -v v1=$t '$1 ~ /v1/ { print $3 }' $CONFIG_FILE` echo "O=" $output_var echo "I=" $input_var done the above code is giving …

Member Avatar for nikita.
0
255
Member Avatar for Iamkenny

Hey guys I have a new problem. I am using mysql as my database. I want to get the sum of an amount between 2 dates heres my code for mysql: select sum(amount) from orderline group by orderlinedate between 'Datehere' and 'Datehere'; But my problem is how do i get …

Member Avatar for wen_cai
0
390
Member Avatar for javaa

Hello ,,, am having trouble while making a drag and drop label i wrote a code i'v seen on youtube , but after compiling i had punsh of Exception and i don't know why !! can any one help me writing a drag and drop code , i'll post the …

Member Avatar for javaa
0
269
Member Avatar for javaa

Hello ,,, i'v started learning Game programming with java before 1 week and now am developing a drag and drop game , and am having a trouble with MouseListener and MouseMotionListener / drag and drop methods / i just wrote a simple code i'v seen on web but i had …

Member Avatar for javaa
0
219
Member Avatar for andy_m

We have a programming assignment for my Java Programming class and I can't figure out to fix my output. Here's the code: class Box { double width; double height; double depth; double w2, h2, d2; double v2; Box() { } Box(double w, double h, double d) { width = w; …

Member Avatar for andy_m
0
142
Member Avatar for Dean_williams

Hello. I was searching on how to copy the string from the first point in the file to the index of comma -1. I have a .mrk file that i would be reading. My idea is that the loop will go through the file and find the comma. There will …

Member Avatar for Dean_williams
0
216
Member Avatar for Octet

Hello, I am trying to create a members page for my website and I want it to display a welcome message for when the person views it, something like: "Welcome <USERNAME>" I am new to PHP so I am not sure if there is something I am doing wrong, here …

Member Avatar for cereal
0
8K
Member Avatar for VenusCrystal

Hi, I have to add css attribute at runtime using jquery.. For example i have the following code: <table width='100%' cellpadding='0' cellspacing='0' > <tr> <td valign='top' width='70%'><span class='header-text'> </span> </td> </tr> </table> I need to add css style to the table. I can access span element of td within table. …

Member Avatar for VenusCrystal
0
174
Member Avatar for yoni0505

Hi, I'm experimenting with A Star pathfinding. I'm having a problem with a function. I'm getting the next error after running it: > Unhandled exception at 0x76ec15de in A Star Pathfinding.exe: 0xC0000005: Access violation reading location 0x08e463a8. the function's code is: void addAdjacent(list* oList, list* cList, int tileMap[][40]) { node* …

Member Avatar for yoni0505
0
1K
Member Avatar for Erwin_Rosyid

I'm coding a calculator with display and controlls in separate forms. I've hit a block on several bugs but the most promenient one is: - The calculator couldn't process more than ONE operator (2+2=OK but 2+2+2=4=NOT OK) - sqrt function is quite broken [Sollution and related files (VC# 2010)](http://www.mediafire.com/?fpwt38lohw98n4o) It's …

Member Avatar for Erwin_Rosyid
0
129
Member Avatar for Kewne

well... I have this code... <?php function ARG_FF() {?> <!--AIR RESTRICTION GAUGE--> <td><select name="gauge"> <option value="8">8</option> <option value="11">11</option> <option value="15">15</option> <option value="22">22</option> <option value="25">25</option> </select></td> <!--FUEL FILTER--> <td><select name="filter"> <option value="20">20%</option> <option value="40">40%</option> <option value="60">60%</option> <option value="80">80%</option> </select></td> <?php }?> and I use it multiple times.... then here comes mysql: …

Member Avatar for Kewne
0
100
Member Avatar for Valiantangel

double a [3]={1.1,2.2,3.3}; cout<<a[0]<<" "<<a[1]<<" "<<a[2]<<endl; a[1]=a[2]; cout<<a[0]<<" "<<a[1]<<" "<<a[2]<<endl; ans to the above is 1.1 2.2 3.3 1.1 3.3 3.3 I am new to array. Please expalin why a[1]=a[2] gave me 3.3 3.3. thank you

Member Avatar for jaskij
0
97
Member Avatar for poojavb

Too weird but still I have a doubt.... I have two table.... -> OutpatientDetails -> InpatientDetails But the fieldnames are same except for the ID....i.e. OutPatientID and InPatientID respectively..... I want to combine both the tables and produce one output.....I dont know whether it is possible or no.... I want …

Member Avatar for poojavb
0
165
Member Avatar for FelineHazard

Hi all, I have a rather basic C/C++ question about the priority of the ++ operator in regard to pointers. Note the following code (joining two strings): #define LENGTH 255 void mystrcat (char *base, char *add) { while(*base) ++base; while( *(base++) = *(add++) ); } int main() { char name[LENGTH]="Feline"; …

Member Avatar for rubberman
0
665
Member Avatar for robin99

hello all I try to store DateTime to mysql , but when i open the table in mysql command line I see that the hour is decrease 12 by it self , why this can happen ,? my insert command is insert = "Insert into Table1(DtIn)values('"+ hin.ToString("yyyy,MM,dd,HH,mm,ss")+"')";; hope someone help …

Member Avatar for robin99
0
103
Member Avatar for triumphost

Is it necessary to seperate the headers from the source? For example I don't know why but I love to do: //Foo.H class Foo { Foo(){} ~Foo(){} void Func() { //......... //......... } void Func2() { //........ //........ } }; Instead of doing: //Foo.H class Foo { Foo(); ~Foo(); void …

Member Avatar for mike_2000_17
0
2K
Member Avatar for Bile

Hello everyone, can some one help me with the code to create a folder by code in vb6? The scenario I have is that I have an application that allows users to login but waht I need specific is to create users forlder during registration so when logged on can …

Member Avatar for Bile
0
76
Member Avatar for asif49

I'm trying to learn how to implement a LinkedList by hand and I notice that when the LinkedList needs to be traversed with a for loop that instead of the usual for loop structure used for traversing arrays.... for (int i = 0; i<length; i++) what is used instead in …

Member Avatar for asif49
0
110
Member Avatar for rannamaa

Im making a program in wich I need to monitore (import) a variable (number from an other program window every time the variable changes. There are very much other information in this window but I only want this number that is occuring at a sertain position in the window. How …

Member Avatar for triumphost
0
164
Member Avatar for Majestics

How can i ready physical layer of osi through c language? Is there any other language to perfom this task?

Member Avatar for DeanMSands3
0
323
Member Avatar for smitty68503

I have an inventory system I am making for my business. I have a form that has a listbox control that lists all the orders that have been submitted. I also have a datagrid that lists the items in the order based on what is clicked in the listbox. I …

Member Avatar for smitty68503
0
207
Member Avatar for MasterHacker110

When i compile my java programs (.java) they all compile into .class file. when i try to run the class file with this command : " java C:\Users\User\Desktop\JavaProgram" It gives the following error: "Error: could not find or load the main class" how do fix this and how do i …

Member Avatar for MasterHacker110
0
245
Member Avatar for MasterHacker110

I have ecidentaly set the .class files to open with notepad everytime. How do i set them back to defualt? i have tried to manually browse to find with what it should open but i dont know with what it should open? Thanks...

Member Avatar for MasterHacker110
0
134
Member Avatar for srk619

need some help on the coding can some plz help the question is: A year is a leap year if it is divisible by 4, unless the year is a Century, in which case it is only a leap year if it is divisible by 400. Write a function which …

Member Avatar for HiHe
0
657
Member Avatar for apanimesh061

[CODE] import java.io.IOException; import java.io.PrintWriter; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; import java.lang.NullPointerException; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; /** * * @author Animesh Pandey */ public class anilet extends HttpServlet { protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); PrintWriter …

Member Avatar for ghul-mur
1
344
Member Avatar for diafol

Hi all, been using Chrome's Inspect Element to debug some js and I came across 2 anomalies: Directly below the html tag: <object type="{0C55C096-0F1D-4F28-AAA2-85EF591126E7}" cotype="cs" id="cosymantecbfw" style="width: 0px; height: 0px; display: block;"></object> Then in the head area: <script type="text/javascript" id="WCIDWAXScript" defer="defer">function WCIDCollect() { var VIS_SIG_TEXT = "T"; var VIS_SIG_IMAGE = …

Member Avatar for diafol
0
343
Member Avatar for TTTHXC

i have a program that converts a text string into a hash sequence using parseInt(). but parseInt() keeps throwing a NumberFormatException. any ideas why? is it becuase i'm using <= instead of = in my for loop? EDIT: ingnore r. it's not being used. sorry. package test; import java.util.Random; import …

Member Avatar for JamesCherrill
0
263
Member Avatar for anuj_sharma

Hi, I need to write a program which can decrease the free disk space. For eg, if the free disk space is 5GB, the application should ask the user how much space do you want occupy. Application should take the input eg, 2GB and decrease the disk space to 3GB. …

Member Avatar for anuj_sharma
0
115
Member Avatar for cossay

Can anyone explain to me why this simple program won't print anything? #include <stdio.h> #include <ctype.h> char * mkUpperCase(char *); int main(void) { char name[] = "information"; printf("%s\n", mkUpperCase(name)); return 0; } char * mkUpperCase(char *s) { while(*s != '\0') { *s = toupper(*s); s++; } return s; }

Member Avatar for Banfa
0
140
Member Avatar for AndreRet

I have been searching for the answer for 2 months, but still no success. Below the setup and connection string and all checked already. Firstly my errorlog file error = 18456 Severity 14 State 11 (Login failed for user OLDPC/GUEST. Token based server access validation failed with an infrastructure error. …

Member Avatar for bear01
0
1K
Member Avatar for Nickl246

Hi, below is my code for an android app I am developing, I was wondering how I can pass the value of pos from the array adapter to another activity through intent? What I would like is for the code in the next activity to be performed based on the …

Member Avatar for peter_budo
0
609
Member Avatar for poojavb

Hello Friends, I need to develop a birthday reminder form in my project.... The list of all patient that are celebrating birthday on that particular day and month...leaving the year.... My database is SQL server and I have used date datatype for it.... So I can I get the month …

Member Avatar for poojavb
0
1K
Member Avatar for jcmeyer

I would like to copy a row in a database and change one value. I think that this is close to what I am supposed to do. [CODE] self.cursor.execute("INSERT INTO DatabaseName (C1, C2, C3, C4, C5) SELECT (?, C2, C3, C4, C5) FROM DatabaseName WHERE C1=?", [newC1Value, copiedC1Value]) [/CODE] Although, …

Member Avatar for webstart
0
222
Member Avatar for 4evrmrepylrning

My brain is freezing up again. I have a string that looks something like this `1 apple--1 pear--1 peach--2 onion--2 carrot--3 <bee mince--3 <por chops--4 <oth salad:--potato--4 <oth bread:--garlic` Then I have a few dictionaries: dic1 = {'1': 'fruit', '2': 'vegetable', '3': 'meat', '4': 'other'} dic2 = {'bee': 'beef, 'por': …

Member Avatar for 4evrmrepylrning
0
218

The End.