5,676 Posted Topics

Member Avatar for LegerdemaiN

[quote=LegerdemaiN;261880]How can I get a program to find and extract an email adress from a line and replaces the @ sign with 'AT'? [/quote] 1) Search for the @ 2) test characters after the @ for valid domain name construct. Memorize the first position that doesn't fit. 3) test the …

Member Avatar for LegerdemaiN
0
91
Member Avatar for GreenDay2001

Depends on what you want to do. If it's just more of the same, as long as you didn't use non-standard Borland functions, your old code should compile fine.

Member Avatar for WaltP
0
104
Member Avatar for arnieman

See [url=http://www.ztwrc.com/tiki-index.php?page=NetDrive]this[/url]. IMO it make this FTP stuff much easier. The FTP site simply becomes a drive on your computer. I use personally use Webdrive.

Member Avatar for TheNNS
0
122
Member Avatar for amishosh

[quote=Anonymusius;261215]You have included header.h twice (In both files). Use some sort code like of this (might be C++, sorry) [code]#ifndef HEADER #define HEADER #include "header.h" #endif[/code] But I dunno wether that is the real problem[/quote] I don't see that problem at all. There is only one include in each .c …

Member Avatar for Anonymusius
0
151
Member Avatar for zac_haryy

[quote=zac_haryy;261473]So what type of code would I have to write to make this work?[/quote] C or C++ might be a start. I can't believe this is your first program in the class so you should be able to do at least part of it. Then when you post something that …

Member Avatar for ~s.o.s~
0
101
Member Avatar for chicagoavonlady

[quote=vegaseat;261458]Take a look at function fscanf() that delimits on whitespaces. Nothing wrong with using it in C++, it is part of ANSI C++.[/quote] Nothing wrong with it but totally unnecessary. [inlinecode]cin[/inlinecode] is just C++'s version of [inlinecode]scanf()[/inlinecode]. And there is no reason to read from a file using [inlinecode]fscanf()[/inlinecode].

Member Avatar for chicagoavonlady
0
111
Member Avatar for vheart20

[quote=vheart20;261332]i want the whole project fully finished do u ahve one where u could send me one[/quote] How much time will you give me to develop it? Are your specification complete enough for me to quickly code the project? How much is your grade worth to you? It's going to …

Member Avatar for WaltP
0
161
Member Avatar for mlawson22

Where did you take the total sold and calculate the total price? Shouldn't that be in each [I]case[/I] statement? Also, at the beginning of your [I]do[/I] loop, you should ask only 2 questions: 1) What product was sold (A-E): 2) How many sold: The your [I]switch[/I] value would be the …

Member Avatar for WaltP
0
252
Member Avatar for Sashar400

In general, you have to read all three colums, and just igore the first 2.

Member Avatar for Ancient Dragon
0
221
Member Avatar for rowly

Actually, you read from one file, then write to another file. You don't want to read and write to the same file. It gets too complicated.

Member Avatar for rowly
0
355
Member Avatar for amishosh

[quote=~s.o.s~;260710][quote=Inanna;260451] 0 doesn't represent a digit.[/quote] Well thats news to me :cheesy: (maybe you wanted to say that 0 doesnt represent true condition )[/quote] I'm with [B]Inana[/B] here. 0 does not represent a digit, it represents a binary 0. '0' represents a digit. A digit is an ASCII character, therefore …

Member Avatar for ~s.o.s~
0
303
Member Avatar for sugantha

[quote] Properly formatted: [code] if (((strcmp(ptr,"int")) || (strcmp(ptr,"float"))) == 0) [/code] [/quote] No it is not. That does not work. Example: [code] #include <string.h> #include <stdio.h> int main(int argc, char* argv[]) { char *ptr = "float"; if (((strcmp(ptr,"int")) || (strcmp(ptr,"float"))) == 0) printf("Yes\n"); else printf("no\n"); return 0; } [/code]

Member Avatar for iamthwee
0
95
Member Avatar for johnnyrocket

[quote=johnnyrocket;259441]I've placed a CSV file into an array with C++ with each row being a single array element, but the file contains many, many columns that I don't need. I only need columns 1,2,3,4,6,7 out of about 50. Is is best to read the full value into the array and …

Member Avatar for iamthwee
0
5K
Member Avatar for phuduz

[quote=phuduz;259967]thnx a lot for all urguys help i really appreciate it![/quote] Yeah, where were you guys when I was learning to code? I could have partied more and let [I]you [/I]do my home work for me, too! :rolleyes:

Member Avatar for ~s.o.s~
0
102
Member Avatar for usr1971ca

In other words: You have 3 files 1) Data File -- what reads the data file? 2) Program -- calculates data from the file. How does the data get into the program? 3) Script file -- somehow runs the program and associates the data with the program. This depends on …

Member Avatar for WaltP
0
129
Member Avatar for Jambar
Member Avatar for mikeallen

[I]straight()[/I] is a terrible function. What about something like [code] isStraight=true; for (i=0; i<8; i++) { for (j=0; j<5; j++) { if (hand[j+1] != hand[j]) { isStraight = false; break; } if (isStraight == false) { break; } } } [/code] Of course modified for your design...

Member Avatar for bumsfeld
0
115
Member Avatar for tlly

[quote=tlly;259444]Hello...I need to write a program where i need to copy each word of a string into an array... Eg(string s="hello how are you" arr[0]=hello,arr[1]=how....). any help:?: ??[/quote][quote=tlly;259455]Thanks mate...but i need the solution in c++...is it posible??...sory for not specifying this at the start[/quote] In other words, "[I]Thanks, but I …

Member Avatar for WaltP
0
107
Member Avatar for shermaine

[quote=andor;259287]PS: Don't post the same question twice ;)[/quote] And please start using code tags, and posting with titles that have some meaning -- like a short description of what the program is about.

Member Avatar for WaltP
0
128
Member Avatar for whitemoss

[quote=whitemoss]Hi WolfPack, ok..I've got what do u mean..and I already try it n it works..but..I still need to type the filename right?..If possible, I just want to run program.exe only but then it can read all the files inside the same directory. [/quote] This may not be necessary. If you …

Member Avatar for whitemoss
0
506
Member Avatar for LieAfterLie

[quote=LieAfterLie;258817]How would i specify a Win32 project in Dev-C++? All that's listed is console, windows app, static library (.a), DLL and empty project.[/quote] Win32 == windows app

Member Avatar for LieAfterLie
0
106
Member Avatar for clulss

Yes, this question belongs in Software development -- IF you are trying to develop the code yourself. If not, just use a calculator.

Member Avatar for pty
0
136
Member Avatar for CurtisBridges

[quote=Ancient Dragon;258123]Arrays must have a name. [/quote] Not in a prototype. Onlyt the [I]type[/I] of the parameter is needed. Curtis: The file must be opened in the execution portion of the code since opening a file is an action. You have it in the declaration portion of the code. Put …

Member Avatar for CurtisBridges
0
99
Member Avatar for CurtisBridges

[quote=~s.o.s~;256829]As far as part c is concerned i will give you small snippet and you can do the rest of the parts yourself. [code] #include <iostream> using namespace std ; int main (void) { int g [5], counter; for (counter = 0; counter < 5; ++counter) g[counter] = 8 ; …

Member Avatar for ~s.o.s~
1
1K
Member Avatar for ~s.o.s~

[quote=~s.o.s~;257275]Hey i was just wondering which is the prominent langauge in the United States of America which is used for development. I know it sounds a bit amatuerish but i dont know how to frame this question. Just wanted to know which langauge is worth learning so that the one …

Member Avatar for iamthwee
0
131
Member Avatar for amir_ct2001

[B]File : Make[/B] project.EXE And please don't hijack threads. You can make your own.

Member Avatar for WaltP
0
109
Member Avatar for Roberdin

[quote=sendoshin;256324]Not to bump an old thread, [/quote] Then why did you? After three years do you really think he's been waiting for an answer?

Member Avatar for WaltP
1
409
Member Avatar for lasher511

[url]http://cache.gizmodo.com/gadgets/images/monitor_arch.jpg[/url]

Member Avatar for Anonymusius
0
202
Member Avatar for RichC

[quote=samoguz;255553]My bad. Let me know if you can read it now.[/quote] OK, now indent your code so it can be read. After every { indent 3-4 spaces, before every } unindent. Can't tell which open brace goes with which close brace with unformatted code.

Member Avatar for RichC
1
129
Member Avatar for ATS
Re: C++

Well, contrary to what you guys have heard, C/C++ is probably the most used language in the industry today. C# is a nitch language, Java is limited, too.

Member Avatar for iamthwee
0
78
Member Avatar for n3st3d_l00p

Since [INLINECODE]mkdir()[/INLINECODE] is not a standard C/C++ function, it's not surprising it doesn't work. The standard language is designed to be ignorant of the 'outside world' (directories, screen, keyboard) so anything that uses them outside the rudimentary I/O is compiler dependant. You'll have to look through your compiler documentation to …

Member Avatar for WaltP
0
624
Member Avatar for Fabii23

Please don't be so cute with your questions. Ask it directly so we don't have to figure out what you want to know. The code is supposed to show us what you've tried, not [B]be[/B] the question. [quote=Fabii23;255824]#include <stdio.h> #include <string.h> char* string(char *str); int main() { printf("%s\n ",string(" in …

Member Avatar for WaltP
0
7K
Member Avatar for Diode

I haven't done this since I left DOS, but I believe you have to load the driver in the System information from the Control Panel. I don't believe [I]config.sys[/I] is read in today's systems.

Member Avatar for Salem
1
199
Member Avatar for ankit_rastogi82

Try rebuilding the other apps. If they don't work it sounds like your [I]libNcdd.so[/I] got corrupted and you need to replace it.

Member Avatar for WaltP
1
78
Member Avatar for cath120

I used [URL="http://www.codelifter.com/main/javascript/dropdown.shtml"]this[/URL] to add to one of my pages -- very simple. I added [inlinecode]document.theForm.theMenu.selectedIndex = 0; [/inlinecode] after the [I]window.open[/I] command to reset the selection.

Member Avatar for tgreer
0
221
Member Avatar for GliderPilot

Do you want this program to work on Macs and Linux? If so, stay away from anything .NET or Windows specific.

Member Avatar for GliderPilot
0
126
Member Avatar for hoosier23
Member Avatar for iamthwee
1
125
Member Avatar for waldis

What have you tried? The code posted doesn't have any file read at all.

Member Avatar for waldis
1
127
Member Avatar for roseangel

[quote=roseangel;250967]Hi, Sorry to ask this question, may be some kind of stupid but I just learning web design for my website only.[/quote] Sorry to have to answer this question :D Gee I'm funny -- NOT! [quote=roseangel;250967]Can anyone recommend any link or web address where I can learn how to build …

Member Avatar for Mardie
0
91
Member Avatar for linux

[quote=linux;251968]I was wondering what an appropriate programming language would be for creating a simple yet expandable (GUI) operating system. Is it possible in: Python? Java? Perl? QBASIC? Ruby? Thanks![/quote] No. C, C++, Assembler, maybe ForTran or Pascal, but doubtful. Dec-10's Tops-10 I believe was written in Bliss.

Member Avatar for Cerberus
0
76
Member Avatar for weltonalicia

Yep. That's the first start. Be sure to use code tags... except for the [I]#include " stdafx. h"[/I] part. For the rest, you have to decide what your 'block letters' should look like, how many characters high and wide. Then use a series of [I]cout[/I] statements to output a line …

Member Avatar for FireSBurnsmuP
0
67
Member Avatar for Diode

[quote=Diode;253847]Well I coded for the backspace. Here is the code if anybody is interested... [code] if (str[num] == '\b') { str[num] = '\0'; printf(" \b"); str[num-1] = '\0'; num = num - 1; } [/code] I put it in a Do-While loop[/quote] A slightly better way may be: [code] if …

Member Avatar for WaltP
1
135
Member Avatar for seeppms

[quote=~s.o.s~;253606] Its normally a rule of the thumb to close the file pointer as soon as you are finished with it to avoid the undefined behaviour of the file stream which you have opened. ---- It is not called not writing into the files, as mentioned by me earlier, it …

Member Avatar for WaltP
1
159
Member Avatar for Diode

You can't in Standard C. Some compilers have special functions that are not portable that can accomplisht what you want, but it's generally different for each compiler. So, if you want to enter the realm of non-standardization, we need more info.

Member Avatar for WaltP
1
1K
Member Avatar for hariza

[quote=hariza;251496]Now I wonder if someone can give an idea on how would be the best way to assemble a function to do this task. Maybe which C function would be the most appropiate to handle the strings and do the word extraction without touching the tags. [/quote] So you want …

Member Avatar for hariza
1
93
Member Avatar for wheelz

I don't think I understand the problem. [quote=wheelz;252938]I am a newbie to C++ and I'm not sure of anything at this point in time however,I got a problem with the starting phase of this program that well prompt the user to input a single character and output a inter4national Civil …

Member Avatar for Ancient Dragon
1
104
Member Avatar for amano

It would really help readability if you'd indent more. 1 space is hard to follow -- it's too much like none. Generally the recommendation is 3-4 spaces. Not a hard and fast rule, but a general rule. Readability is the key.

Member Avatar for Dave Sinkula
0
1K
Member Avatar for Suraj Shrestha
Member Avatar for adalita_m
Member Avatar for the.future.zone

[code] While (b not 0) { test odd or even { save the result (0 or 1) in an array } shift b right 1 bit (or divide by 2) } output the array from last value to the first. [/code] If you use the division version, [B]b[/B] should be …

Member Avatar for rinoa04
1
113

The End.