15,300 Posted Topics

Member Avatar for sjgriffiths

If the strings are always in that exact format than this should work. [code] int main() { char s1[] = "www.clickajob.co.uk%2Fprofiles%2F316%2F6%2F|a/TLT10911641168.google"; char s1a[50] = {0}; char* pos; pos = strchr(s1,'%'); *pos++ = 0; strcpy(s1a, s1); pos = strchr(pos,'/'); strcat(s1a,"|"); strcat(s1a,pos+1); printf("%s\n", s1a); return 0; } [/code]

Member Avatar for Ancient Dragon
0
82
Member Avatar for Ancient Dragon

Is it just my browser IE7 on Vista ? I don't see any submenus when I hover the mouse over the main menus such as [b]Software Development[/b]. I deleted temporary internet files but that didn't help.

Member Avatar for Dani
0
106
Member Avatar for FTProtocol
Member Avatar for FTProtocol
0
124
Member Avatar for &rea

put a print statement at the beginning of the function to print out the value of height_rect and width_rect. Are they what you would expect? If not then the problem is elsewhere in your program.

Member Avatar for Duoas
0
169
Member Avatar for Extremus

[QUOTE=ithelp;620611]Install VC++ Create a MFC application it is quite easy.[/QUOTE] The current free compiler VC++ 2008 Express does not support MFC. You will have to buy it do get MFC. VC++6.0 does support MFC ok but that is a terrible compiler because it doesn't support the C++ language very well …

Member Avatar for Ancient Dragon
0
135
Member Avatar for philmonthoss

Lord of the Rings was written by who? Blizzard possibly? Why don't you ask them? Also, thanks for bumping a 2-year-old thread :)

Member Avatar for acejames1
0
205
Member Avatar for somename

The open flags do not set the file permissions -- they are two completly different things. After copying the file you have to change the permissions. [URL="http://www.faqts.com/knowledge_base/view.phtml/aid/24443"] Here's how to do it[/URL].

Member Avatar for somename
0
131
Member Avatar for faust_g
Member Avatar for GARUD

I really don't know a hill of beans about blogs either. I thought a blog is just a plain text file which is posted on someone's web site, such as DaniWeb's blog board. You could write it with Notepad.exe (on MS-Windows) if you want to. Or, is Garud actually talking …

Member Avatar for Microsys
0
198
Member Avatar for booly_joon

Here is how I would allocate A [code] const int maxelms = 4; int i; double** A; // allocate the first dimension A = calloc(maxelms, sizeof(double *)); // now allocate each of the other dimensions for(i = 0; i < maxelsms; ++i) { A[i] = calloc(maxnums, sizeof(double)); } [/code]

Member Avatar for Ancient Dragon
0
80
Member Avatar for CodeBoy101

just write it multiple times using a different filename each time. Or write the first file then call os-specific command to make additional copies.

Member Avatar for CodeBoy101
0
135
Member Avatar for kaos

use the mod operator % to get a value from 0 to some upper-limit. For example to get a random number between 0 and 100 [icode]int num = rand() % 100;[/icode] Much more information [URL="http://www.cprogramming.com/tutorial/random.html"]about it here[/URL].

Member Avatar for kaos
0
106
Member Avatar for ytregnn

>>For an example look at this site: [url]http://svenskaspel.se/pl.aspx?PageID...&parentid=4373[/url] That link is useless to most of us because its not in English.

Member Avatar for ytregnn
0
176
Member Avatar for Traicey

lines 19-23 can be rewritten like below because it isn't necessary to test for eof directly. [icode]while( Infile >> N >> A >> G) [/icode] delete line 63 if you recode as above Other than the above, I don't know what kind of help you want.

Member Avatar for Traicey
0
84
Member Avatar for myleila

[URL="http://en.wikipedia.org/wiki/Dijkstra's_algorithm"]Here[/URL] is some pseudocode code

Member Avatar for jephthah
0
185
Member Avatar for Metalsiege

The header file and line 62 of the *.cpp file are incorrect. The parameter you have declared is just one single character -- I know of no names that consist of a single character. It should be this: [icode]void DisplayName (char* pFullName);[/icode] or this [icode]void DisplayName (char pFullName[]);[/icode]

Member Avatar for Metalsiege
0
86
Member Avatar for Jennifer84

Try redrawing the original graph with the same color as the background so that the lines will get erased, then draw the new graph.

Member Avatar for Jennifer84
0
116
Member Avatar for majestic0110

Dr. Who is IMO the all-time best sci fi series ever shown on TV, even outshining Star Trek. The movie made by 20th Century Fox Television, however, was a disaster. As for the authors: Dr Who -- I don't know who can be considered the author because I think it …

Member Avatar for selfhelpebooks
0
280
Member Avatar for savinki
Member Avatar for Hockeyfreak889
Member Avatar for Ancient Dragon
0
60
Member Avatar for Arctic wolf

>>I was wondering how can I make a precise delay that is shorter then 1ms depends on the operating system. Neither MS-Windows nor *nix will allow you to do that because neither operating systems are real-time os. There are a lot of other programs that have to be executed as …

Member Avatar for Arctic wolf
0
122
Member Avatar for jokinjoe

What you want is a simple line drawing program. How to do it depends on the operating system because each one is different. And all of them are somewhat complex.

Member Avatar for Ancient Dragon
0
34
Member Avatar for timdog345

>>scores[26] == scores[26]<24 ? in : in; I have no clue what that is trying to do There are 8 sets of values that the scores can fall into, not 32. So all you need is an array of 8. When you read a score just use a series of …

Member Avatar for timdog345
0
139
Member Avatar for savinki

you have to allocate memory for pointer a. The way you have it written pointer a just points to some random memory location that your program probably does not own. [code] char *p = "asd"; char * a [color=red]= new char[strlen(p)+1][/color]; [/code] The second reason your program doesn't work is …

Member Avatar for Ancient Dragon
0
114
Member Avatar for Math.C

[QUOTE=williamhemswort;618487] [B]<iostream.h> was declared deprecated[/B][/QUOTE] More about that [URL="http://members.gamedev.net/sicrane/articles/iostream.html"]here[/URL].

Member Avatar for Ancient Dragon
0
99
Member Avatar for FTProtocol

>>i believe it better than winsock so i really dont care. No it isn't -- the code you posted IS using winsock, it does not replace it. There is nothing wrong with using libraries that make your life a little easier, all programmers do that. >>everything i've learnt, ive learnt …

Member Avatar for Ancient Dragon
0
108
Member Avatar for suxxor

depends on the hardware that linex is running on -- if its on an 80x86 or Pentium box then there will be no difference at all. Linex (or unix) is supported on a lot of other platforms and the assembly instructions for those will be very different than on ms-windows. …

Member Avatar for Ancient Dragon
0
62
Member Avatar for vs49688

[list] [*]RegOpenKey() to open the key [*]RegEnumValue() to read the value directly into the string [*]CloseKey() to close the key object [/list] [URL="http://msdn.microsoft.com/en-us/library/ms724875(VS.85).aspx"]Registry Fucntions here[/URL]. [URL="http://msdn.microsoft.com/en-us/library/ms724256(VS.85).aspx"]Example program here[/URL]

Member Avatar for vs49688
0
85
Member Avatar for handytxg

Since you didn't post any code we can only guess that you are attempting to write back to the file that you read from. You can't do it that way. Open a different file for output then read a character from input file and write the morse code to the …

Member Avatar for Ancient Dragon
0
177
Member Avatar for brk235

read a random number into a float between the range of 0 and 100, then divide by 100 to get a number from 0 to 0.9999

Member Avatar for William Hemsworth
0
116
Member Avatar for phalaris_trip

There is never ever an acceptable use of [b]goto[/b]. I know teachers who give an F for a program that uses it, and the companies I worked for absolutely forbid it.

Member Avatar for Duoas
0
274
Member Avatar for jedwards1150

$270.00/credit hour :icon_eek: I have some shares in the Golden Gate bridge I'll sell you for half that much.

Member Avatar for jedwards1150
0
206
Member Avatar for risa

you could set a timer and close the dialog box in the OnTimer() event handler. There may be a couple other options: (1) send a WM_CLOSE message from another window or (2) click the X button in the upper-right corner, assuming you have not removed that too.

Member Avatar for Anitaj
0
218
Member Avatar for hoonv11

what programming language. You can ask questions right here on DaniWeb. Do you want a web site that lets you type in a program and see if it will compile?

Member Avatar for sarehu
0
114
Member Avatar for anandi.sa

A macro is something that is expanded by the compiler's preprocessor. A constant is like a normal variable but whose value can not be changed, nor is a constant affected by the preprocessor.

Member Avatar for sarehu
0
160
Member Avatar for UrbanKhoja

you mean people old enough to post on the internet still have a nanny? Isnt' a nanny just another word for a baby sitter?

Member Avatar for scru
0
333
Member Avatar for >shadow<

Can't speak for others but those kind of ads don't bother me at all and I'll occasionally click on one to see what its about. I don't have any clues about your other questions.

Member Avatar for gdi
0
96
Member Avatar for majestic0110

The most irritating and longest bug to fix was in a MS-DOS 6.X program. I had my own multi-threading kernel and several threads. One thread would set the value of a global integer and another thread would read it. One of the threads (foreground screen) would occationally lock up and …

Member Avatar for twomers
0
137
Member Avatar for efp1225

where did you get that library ? The author of the lib should have provided you with the needed non-standard header files.

Member Avatar for Zabbat
0
113
Member Avatar for Citrus_Crow

A KVM switch works very well, I've used it to control four computers with one keyboard, one monitor and one mouse. But don't expect them to last forever -- they wear out eventually and you will have to buy another one.

Member Avatar for Citrus_Crow
0
170
Member Avatar for Jennifer84

>>Is there any classes/ built in methods for this. No >>Is this very difficult things to do in C++ ? Depends on your experience. What is easy for me might be very difficult for you. >> Do I need any Add-In:s to C++ etc.. to be able to do this. …

Member Avatar for mitrmkar
0
299
Member Avatar for drichird

>> Where does WinAPI fit into all this That is the Windows operating system functions. OpenGL, DirectX, etc are wrappers around win32 api functions. You can do windows graphics without OpenGL or DirectX, but you can't do OpenGL without the WinAPI.

Member Avatar for Grigor
0
166
Member Avatar for savinki

Here is the c++ way of doing that [code] #include<iostream> #include <string> #include <vector> #include <sstream> using namespace std; class X { public: string a; string b; string c; }; int main() { string abc = "as,df,ert:we,rt,yu:ee,rr,tt"; vector<X> vtr; X xx; size_t pos; while( (pos = abc.find(':')) != string::npos) { …

Member Avatar for Radical Edward
0
277
Member Avatar for afrozajb
Member Avatar for Kristyne

Welcome to DaniWeb. There are several old-timers here, so you will fit right in. >>Am I in the right place? Absolutely :)

Member Avatar for stocky
0
71
Member Avatar for crabby1

Welcome to DaniWeb, Crabby. [URL="http://www.programmingforums.org/member2600.html"]Meet Grumpy[/URL], also from you part of the planet.

Member Avatar for stocky
0
57
Member Avatar for Dave Sinkula

This is the day that Americans honor our dead soldiers for the ultimate gift of life that they gave us. We have outdoor barbecues, drink beer, have large televised parades, and visit fallen soldiers at their grave sites.

Member Avatar for Ancient Dragon
0
73
Member Avatar for savinki

>Opps, I just realized I posted this in the C forum ;) I thought I was in C++. You posted in the right place. It doesn't matter what compiler you use, its the code not the compiler that determines which board to post on. [edit]Oops! I see the cout now. …

Member Avatar for saandeep_jan
0
1K
Member Avatar for Ancient Dragon

I tried to upload a *.zip file in [URL="http://www.daniweb.com/forums/post608544.html#post608544"]this thread[/URL] (post #28) and it failed. I thought zip files were acceptable.

Member Avatar for sarehu
0
234
Member Avatar for TeCNoYoTTa

[URL="http://www.datareel.com"]DataReel.lib[/URL] is free and portable to both *nix and MS-Windows. It has a huge amount of functions to do networking and other stuff.

Member Avatar for TeCNoYoTTa
0
156

The End.