199,114 Archived Topics
Remove Filter ![]() | |
hello, am doing a project for school . it involves a lot of file and string operations and i keep compiling the code over and over again to see if it is working properly ... all of a sudden the code simple stopped executing .. the code ran a number … | |
disclaimer I'm a programming n00b so I may not know what I'm talking about. /disclaimer My question boils down to scopes. Let say I have code [code] { string mystring1; string mystring2; string mystring3; //code dealing with mystring1 //code dealing with mystring2 //code dealing with mystring3 } [/code] versus [code] … | |
:sad: Codes: if (sock!=INVALID_SOCKET) { if(send(sock,s,(int)strlen(s),0)==SOCKET_ERROR) { WSAGetLastError(); } } s is a char pointer pointing to the very first memory location of the data string. While in debugging mode, there was no error from `WSAGetLastError()`, but the data string was not displayed in the server. Why? Thanks | |
[code] int r = rand()%2; switch(r) { case 0: string x[] = "Hi."; break; case 1: string x[] = "Bye."; break; } [/code] Will this code produce a conflict on the string "x"? | |
I've never seen this before and am perplexed beyond belief... by the way I'm using Visual Studio I have a rather large program/game i'm working on right now, and it reads in via ifstream file i/o from binary files in several locations to initialize variables. For some reason for one … | |
I am trying to write a program to convert a roman numeral to decimal. If I define a variable with: [inlinecode]char roman_num[15];[/inlinecode] can I then select individual characters in that roman numeral with: [inlinecode]roman=roman_num[i];[/inlinecode] where "i" is a number value of the character I want to retrieve from 0-14? Also, … | |
Hi all! im new here, this is my first post :lol: lol anyway, i have a php script, but im having trouble setting it up.. can somone help me with it?? Thanks for any help | |
Hi, I have a website running largely based on the opensource osCommerce php. Recently we have experienced problems with pages crashing half way through loading. This seems to occur randomly maybe about 5-10% of the time you load a page. What happes is that the page will start loading and … | |
Hello , If you know the answer please simplify it for me. I am so discouraged trying to figure this out. I'll be very grateful, Thanks ahead a time! When I insert my (2) selected photos in my photo form , they show two pictures but it repeats only (1) … | |
I am looking for a freelancer to create a payment/subscription system on my website. You can view the details at [url]http://www.scriptlance.com/projects/1148073042.shtml[/url] | |
hi, i got problem in covert the data to integer example: in my database is bv column is 2.0000 now i want it convert to 2 how to i do so? in php thanks for advance | |
I know how to change the console text color using this code [code]HANDLE hConsole; hConsole = GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleTextAttribute(hConsole, ###)[/code] But suppose I need to change colors frequently and on different output lines. Is there a shorter way to do it, like [code] cout[color=red] << "text"; [/code] ??? Rant: Google searching … | |
This is a question from a mid-term I had awhile ago. I just want to hear what you guys think the answer is, because I just can't agree with the teacher on this. A(n) ____ is a listener interface that listens for any events that occur during the execution of … | |
I have 10 large .txt files with over 13,000 rows of data. Each “column ![]() | |
Hi all, I'm transistioning from the networking end of things and moving to the programming side, so, even though I've been around here for quite awhile, I have a pretty basic queston: since the char data type has a minimum range values between -127 to 128, how is a letter … | |
THe foll is a part of a prg i have to append one dummy list to a original list at destination in the original list .So plz help me i am a new user so sorry for any mistalke Here is the code :[code] #include<stdio.h> #include<conio.h> struct node { struct … | |
Hi all: Say, my program is about to receive a string "ABC", and I want to test if the string really contains "ABC". What is the best way to test it? I am thinking of read all the characters from the incoming string one by one, but not sure which … | |
Hi Guys, Does any of you know how to dynamically add steps to a wizard control. I have been able to display the steps; however, in the next iteration the wizard steps disapear. Also, I had to add a template step for the dynamically added wizard steps controls to be … | |
Hi I got diffrent date formats from a database and I would like to convert the to a date. I don't have the option to work with the sql, since that query is fixed (long story) "20051231","2005-12-31","2005-12-31 09:29:52" ==> "2005/12/31". My first tought was to trim the string and remove … | |
Hi, Is it possible to open a M$ Word doc in a RTF box? I thought of opening the doc in word and saving it as temp.rtf then opening that file in my rtf box, this would be a poor way of doing this. Any other ideas? pG | |
Hello there, Okay well i have tried to do this program but i'm just not sure if i'm going in the right direction. Well i have to create a text file (Did that) which is inputed into the program, and the program has to count the instances of the following … | |
I need to write a function that will take a string and an int and return the string from index int onward. for ex [CODE]Line = "Enter a line: "; WriteString(RetStr(Line,4 )); //Should return er a line: AnsiString RetStr(AnsiString Str, int Start) { int ill; ill=1; char temp; while (Start!=Length(Str)) … | |
hello, i have a few questions pls help me out with them coz am really confused .. 1. can lists or vectors passed as parameters in a function? 2. can the lists or vectors be returned ? i want to use lists or vectors in classes i need to knw … | |
Hi all: According to the library, recv() will return a zero if the socket is closed, and a SOCKET_ERROR if the socket meets an error. But when I closed my socket (at least I think I closed it properly), recv() returned a SOCKET_ERROR other than zero. Wondering why? Thank you … | |
How do I display then hide a progress box. I don't want any input or check boxes, just show the user that the computer is alive and working. A counter will be nice. When the task is done, the codewill remove the box. Thank you, Bkelly Oops, I forgot to … | |
i'm trying on the tutorial at http://tools.osmosis.gr/blog/archives/2005/03/birt_rcp_viewer_1.html i have a openReportEditor method as shown below: private void openReportEditor() { serverUrlText.setText("[URL="http://127.0.0.1/"][COLOR=#0000ff]http://127.0.0.1[/COLOR][/URL]:8181/birt/"); String uri = serverUrlText.getText(); ReportEditorInput input = new ReportEditorInput(); input.setUri(uri); OpenNewBrowserAction action = new OpenNewBrowserAction(input); action.run();} when i have created a button and i would like to call the openReportEditor. … | |
I was on Cplusplus tonight, learning a bit about data structures (which I like). Well, I copied and pasted one example, ran it, learned a bit. Then I tried the same for the second. Here's the code for the second... [code]// array of structures #include <iostream> #include <string> #include <sstream> … | |
Hi all: I have successfully opened a socket to a server and trying to send some data vai the send() function. But what surprised me is: [URL="http://www.daniweb.com/techtalkforums/wsagetlasterror_2.htm"][B]WSAGetLastError[/B][/URL]() returns nothing, which means the data has been sent to the server, however all the data (a string) will only be displayed at … | |
Hi,all.I want to know why this program can not run faultlessly? Thanks to all. [code] #include <stdio.h> #include <stdlib.h> typedef struct link{ char data; struct link * next; struct link * pre; }list; main() { list * head=NULL; /* Define the head node */ list * linklist; /* Define the … | |
Title says it all. I've tried getting different system properties with no luck. Not sure if "java.compiler" is the right one or not, but it always returns null for me. The others I've tried are: "java.home" "java.library.path" "java.class.path" java.home gives me: c:\java\j2sdk1.4.2_05\jre But javac is in c:\java\j2sdk1.4.2_05\bin I don't want … | |
ok, i am having a problem, i have a player at [url]www.ghostlypets.com[/url] , i found the script at a friends site, copied it, and modified it, when i try to play a song it takes about 3 minutes to buffer, it is [I]not[/I] my computer, also sometimes it doesnt work … | |
After exploring PHP for the past few days, I've been trying to use it on the new CSS based website that I'm creating. I'm trying to use "include" function in order to get my "header", "topMenu", "leftMenu", "rightMenu" and "bottomMenu", since in ALL the pages, these would be common. The … | |
Hi.. I have nearly learnt c++ ..and I want to learn java as i suppose softwares solutions are usually provided in java..:?: ...I know nothing about java.I saw the tutorials ..but the were not introductory..can someone help....??? Thanks in advance. | |
Hi all: I wrote a simple program to open a socket to localhost port 8201. Codes: ...... [CODE]if (WSAStartup(VERSION, &wsadata) != NO_ERROR) { WSACleanup(); return EXIT_FAILURE; } open_socket(serverName, port); SOCKET open_socket (const char *serverName, const int port) { struct hostent *server = NULL; SOCKADDR_IN serverAddress; sock = socket(AF_INET, SOCK_STREAM, 0); … | |
Hi, I am having the problem of running ps2pdf from a python script. From the command line, ps2pdf works just fine. However, when I tried the following code: os.chdir("/tmp/test") # file.ps resides in this dir os.system("ps2pdf file.ps file.pdf") The script generated an empty file.pdf with no pages. Does anyone know … | |
hiya in my database i have a users table Create Table Users( user_id INT UNSIGNED NOT NULL AUTO_INCREMENT, email varchar (40) NOT NULL, pass CHAR (40) NOT NULL, first_name varchar (15) NOT NULL, last_name varchar (30) NOT NULL, active CHAR (32), registration_date datertime NOT NULL, PRIMARY KEY(member_id), UNIQUE KEY (email), … | |
I have "discovered" a need to do some development for an embedded system. We have a PC-104 computer that boots MS-DOS 6. It does have VGA display and regular keyboard input. I need to develop some code to drive a digital I/O board. I can do this is C or … | |
Hi All I'm new to Python and have created the below little program but would like to be able to print the loop final count (eg. 8 years) rather than every loop. Any hints on how to do this? def main(): print "This program calculates how long it takes for … | |
HI [CODE]class Astro { var $jd; var $dec; var $ra; var $sid; var $dra; var $rsum; function Astro() { $this->jd = 0.0; $this->dec = array(0.0, 0.0, 0.0); $this->ra = array(0.0, 0.0, 0.0); $this->sid = array(0.0, 0.0, 0.0); $this->dra = array(0.0, 0.0, 0.0); $this->rsum = array(0.0, 0.0, 0.0); } function copyFrom(&$source) … | |
hi can any one give me a code for chatserver in java which have bi-directional comminication.lik server listen more no.of clients n give reply and client mak request to server. ther should be a frame where a textarea and a textfield.all messages are printed on textarea and after hit of … | |
Hello, I am using fedora 5 and installed wxpython in an effort to program in python/wxpython (installed wxPython-2.6.3.2-1.fc5.i386.rpm, wxGTK-2.6.3-2.6.3.2.1.fc5.i386.rpm and wxGTK-gl-2.6.3-2.6.3.2.1.fc5.i386.rpm). When I run my test script to create a frame, a notebook and an image on one of the pages of the notebook, I get a GDK error when … | |
Hey guys just wondering how i can sort the linked list by categoryName for the drink type list. Iv done the linked list in my code but its not sorted? Could someone help me write an algorithm or sum pseudocode [code] #ifndef GJC_H #define GJC_H /* System-wide header files. */ … | |
First of all, hello everyone. My problem is this. In writing a program which accepts multiple user inputs of type [B]int, [/B]during the first run through the program, after the first [B]cout << [/B]statement prints, I have to press enter twice in order for the second [B]cout [/B]statement to display. … | |
<<split from: [thread]42172[/thread]>> [QUOTE=weehoong]Hi there guys! Just want to say these communities are great! i've really benefited alot from the forum and its tutorials. Special thanks to [B]FireNet [/B] and his file handling tutorials. It really helped me alot! Not forgetting, thanks alot to all of the members here too. … | |
Hi I am trying to fill a combobox with the files from a FileListBox the code i am using is [CODE]Private Sub Form_Load() File1.Path "C:\Images" File1.Refresh If File1.ListCount > 0 Then For i = File1.ListCount To -1 Combo1.AddItem File1.List(i) Next End If End Sub [/CODE] The FileListBox fills with the … | |
hi, can someone understand how the new element is being attached to the list in this code? [CODE] void insertSortedList (Node **head, int value) { /* creating a new node */ Node *ptr = createNode (value); Node **pCurrent = head; /* adding the new node to the correct place in … | |
Hi All, I have a problem with a table level constraint i want to create. i have 3 tables: products categories product_categories - use to connect product to categories since a product can be added to more then one category. my problem is i want to create a contraint in … | |
HI members; This is a memory game with c++ concole application. This is the code: [CODE]#include<iostream.h> //MEMORY GAME. #include <algorithm> //DESIGNED BY GLADIATOR1919. #include<ctype.h> //GLADIATOR1919@GMAIL.COM. #include<time.h> //ALL RIGHTS RESERVED. #include<windows.h> int e,i,j,q,m,n,x=0,row_1,column_1,row_2,column_2,score=0; char rand_1[16]={'a','g','h','j','k','a','s','d','f','g','s','d','f','h','j','k'}; struct mem_char { char ch[5][5]; }; char re_play; mem_char char_1[2]; void end_game(); void input_first_point(); void input_second_point(); … |
The End.