15,300 Posted Topics

Member Avatar for serkan sendur

You get PMs from Happygeek. Although honestly I have never heard of those people who mentioned me as a referral, at least I don't recognize their user names.

Member Avatar for serkan sendur
0
127
Member Avatar for SallyJ

>>I'm only new to C++ and need urgent help with an assignment that's due tomorrow. Procrastinating did you :) You can not leave programming assignments until the last minute, if you do you will fail the course. Programming takes lots and lots of time and effort. Do the program one …

Member Avatar for ithelp
0
134
Member Avatar for GrimJack

I have [URL="http://www.worldcommunitygrid.org/"]World Community Grid[/URL] on my 4-core computer. It uses each of the cores to run different programs at the same time.

Member Avatar for ithelp
2
91
Member Avatar for BruenorBH
Member Avatar for jesseb07

why not just pass the linked list by reference [code] Link<std::string> filled; //fill filled with data TransferLink(filled); //other file void Link<T>::TransferLink(Link<T>& start) { // fill in the linked list here } [/code]

Member Avatar for jesseb07
0
105
Member Avatar for dzoch89

>>word = (word*)malloc(num * sizeof(word)); You can't malloc() a non-pointer variable. Change line 49 to [icode]char **word;[/icode] then change line 60 to [icode]word = malloc(num * sizeof(char *));[/icode] You will have to redesign other parts of that code too. The loop that appears before the malloc() will not work after …

Member Avatar for Ancient Dragon
0
121
Member Avatar for sneekula

[QUOTE=vegaseat;789715]In the news: Citicorp Bank just bought a new corporate jet for $50 million with some of their bailout money.[/QUOTE] due to bad publicity and public outcry that jet was cancelled. I hope Obama makes those bankers pay back every penny or put them in prison for the remainder of …

Member Avatar for vegaseat
0
255
Member Avatar for xVent

The problem is most likely DLLs. I have seen similar error on Vista. Make sure you compile the program for Release mode, not Debug mode. How to do that will depend on the compiler you are using.

Member Avatar for Ancient Dragon
0
125
Member Avatar for alexms

Since the fields are separated with | I think it would be easier use fgets() to read the entire line then parse the string using strtok(). [code] char line[255]; while( fgets( fp1, line, sizeof(line) ) != NULL) { char* ptr = strtok(line, "|"); strcpy(fms->headCategory->categoryID, line); ptr = strtok(NULL, "|"); strcpy(fms->headCategory->fareType,, …

Member Avatar for nexocentric
0
2K
Member Avatar for kvprajapati

you can't do it with that compiler. Get yourself a free copy of a modern compiler and it will create all the nodes you want. There are several free compilers, such as Code::Blocks, Dev-C++, and VC++ 2008 Express. Just google for them and you will find them. I ran your …

Member Avatar for John A
0
167
Member Avatar for Xamas

>>is it possible to have two different names of one functions Short answer: no However, what you could do is put all the common code into a single function which is called by the other two functions [code] int common_code(int info) { // blabla } int do_my_server(int info) { common_code(info); …

Member Avatar for ArkM
0
107
Member Avatar for Peyton

>>1) How could time (in the form of HH: SS above) be represented in the array, so >>that they can be subtracted? How do you subtract when Don't put the dates/times in an array at all. Convert the time read from each line into seconds, then all you have to …

Member Avatar for Peyton
0
159
Member Avatar for ks7_666

what don't you understand about those problems? Q1: once you know what [URL="http://en.wikipedia.org/wiki/Pythagorean_triple"]Pythagorean triples are [/URL]then the rest is not difficult. Try to write the program yourself, and post the code you have written if you still can not solve the problem. If you was able to do Q4 then …

Member Avatar for jephthah
0
315
Member Avatar for Ancient Dragon

I read somewhere that someone would pay for me putting their links in my signature (not necessarily ME but anyone). Is that just a scam to get people to post their links ?

Member Avatar for dailyearner
0
85
Member Avatar for BoneXXX

At line 17 of the code you posted the variable [b]j[/b] is only visible in that for loop. If you want to use that variable again on line 21 it will have to be declared again just like it was on line 17. Another way to fix the problem is …

Member Avatar for BoneXXX
0
354
Member Avatar for GSpyder

Welcome to DaniWeb. Location: Do you mean Colorado USA? We have a lot of non-Americans here and CO doesn't mean much to them. >>Relationship Status: Married--I live in a zoo. Maybe you should think about sleeping in separate bedrooms from now on :)

Member Avatar for jbennet
1
204
Member Avatar for threat

It goes into an infinite loop when page count goes down to 0 but time is greater than zero. When at line 159 the value of page is 0 the program executes the else statement at line 171. Notice that the value of tim does not get decremented there.

Member Avatar for nexocentric
0
162
Member Avatar for Shmera

declare the macro _UNICODE and UNICODE, then include <tchar.h> for the macros to convert char* string literals to wchar_t* string literals. There may be more to it than that, I have not tried it with Dev-C++.

Member Avatar for Ancient Dragon
0
387
Member Avatar for macdoods

I get similar behavior on occasion. What I do is click somewhere else on the window that has no links, only white space. After that the blue link will usually work right. Another thing you can try is copy the link location onto your computer's clipboard and paste it into …

Member Avatar for macdoods
0
127
Member Avatar for Clockowl

If you want the friend function then preceed the function name by :: [icode] return ::gcd(nominator, denominator);[/icode]

Member Avatar for Clockowl
0
178
Member Avatar for ScienceNerd

What compiler did you use to compile that ? I tried to compile it with VC++ 2008 Express and got billions of errors. The first error was undefined function count_file_values() that appears on line 15 of the code you posted. So, don't complain about the program not working right when …

Member Avatar for WaltP
0
128
Member Avatar for booker

depends on the compiler and operating system. most likely that matrix is overrunning stack space.

Member Avatar for tux4life
0
225
Member Avatar for xyster

Change proc_new_disk_reques() to return a pointer and your program should compile [code] [color=red]DiskRequest* [/color] proc_new_disk_request(int procnum, int sectornum, ReadOrWrite rw) { DiskRequest *new_request; new_request = (DiskRequest *) checked_malloc(sizeof(DiskRequest)); new_request->dr_procnum = procnum; new_request->dr_sectornum = sectornum; new_request->dr_rw = rw; new_request->dr_next = NULL; return [color=red]new_request;[/color] }[/code] Note that at some point in the …

Member Avatar for xyster
0
147
Member Avatar for ghost305

why are you using [icode]std::list< std::string > rolodex[/icode] instead of [icode]std::list< Card > rolodex[/icode] ?

Member Avatar for ghost305
0
94
Member Avatar for DaveD3

win32 api function is very simple -- just a one-liner [icode]MessageBox(NULL, "Testing", "Title Here", MB_OK);[/icode] MFC is even a little easier. I think the .NET version is just as easy [icode]System.MessageBox(<blabla>);[/icode] or something like that.

Member Avatar for DaveD3
0
106
Member Avatar for Ancient Dragon

[URL="http://www.youtube.com/watch?v=0gsJBYx3qYM&NR=1"]Banned Airplain Accident[/URL] [URL="http://www.youtube.com/watch?v=nwSalVn0Muk&feature=player_embedded"]And here is a variety of them.[/URL] Nice YouTube video.

Member Avatar for jbennet
0
37
Member Avatar for Skainstein

[QUOTE=Skainstein;850289]Hi all. Could anyone please put comments on each command that Ancient Dragon posted? It's just to be sure what each of them means. I'm having trouble compiling this: [code=c++] //blabla char OutFile[100]; FILE* fp; sprintf(OutFile,"wind%d", date); fp = fopen(OutFile,"w"); OutFile << "Longitude\tLatitude\tDirection\tVelocity\n";//here appears an error!! //blabla [/code] Maybe there …

Member Avatar for William Hemsworth
0
150
Member Avatar for kashmir323

[URL="http://www.cplusplus.com/reference/clibrary/cmath/"]Read this[/URL]

Member Avatar for tux4life
0
56
Member Avatar for BruenorBH

[quote] [icode]char * strncpy ( char * destination, const char * source, size_t num );[/icode] No null-character is implicitly appended to the end of destination, so destination will only be null-terminated if the length of the C string in source is less than num.[/quote] [url]http://www.cplusplus.com/reference/clibrary/cstring/strncpy/[/url] In your example [icode] strncpy(Hour, …

Member Avatar for nucleon
0
145
Member Avatar for Siaa

How much time did you say you have ??? [URL="http://www.spikenet-technology.com/download/SNVisionSDKdatasheet.pdf"]Here[/URL] is one such software that took 15 years to develop.

Member Avatar for nucleon
0
383
Member Avatar for Ancient Dragon

Is it possible to add animated gif files to posts? I have tried [noparse][img] [/img] [/noparse] but it doesn't work. I've also tried to upload a gif file using the URL option, but that fails too.

Member Avatar for jbennet
0
159
Member Avatar for burger87

google found [URL="http://www.codase.com/search/call?name=GetPrivateProfileString"]this example [/URL]pretty quickly

Member Avatar for Ancient Dragon
0
73
Member Avatar for bryanhjkim

[code] ReadFile(com_port,&output,readlength,p_readlength,NULL); std::cout << output<<std::endl; [/code] In the first line the 4th parameter is nothing more than a pointer to the 3d parameter. declaring another pointer is not necessary. And do not put & symbol whan passing character arrays. [icode]ReadFile(com_port, output, readlength, &readlength, NULL);[/icode] >>std::cout << output<<std::endl; That's the reason …

Member Avatar for bryanhjkim
0
219
Member Avatar for mini programmer

>>MyClass <DataType,int>:: search' : not all control paths return a value Yes, tis true. The function can terminate without returning a value. When [icode]if ( (node->data).key == key)[/icode] is fales, the else statement is executed and the function terminates without returning a value.

Member Avatar for mini programmer
0
154
Member Avatar for upstream

[QUOTE=yollyP.;777036]I'm still not at-ease in giving credit card information through the net, and any personal information whatsoever. [/QUOTE] I'm with you -- I don't buy anything on the net unless that's the only way to get it. There are just too many instances of where huge company databases have been …

Member Avatar for nelixinc
0
199
Member Avatar for Argo54325

simple example [code] #include <map> #include <string> #include <iostream> using namespace std; int main() { std::map <std::string, int> m; m["cpp"]++; m["exe"]++; m["exe"]++; m["exe"]++; m["exe"]++; m["ppt"]++; m["ppt"]++; m["ppt"]++; std::map <std::string, int>::iterator it; for(it = m.begin(); it != m.end(); it++) cout << it->first << " = " << it->second << "\n"; } …

Member Avatar for Argo54325
0
214
Member Avatar for jephthah

Congrats on your first star. :) But ... [URL="http://www.daniweb.com/forums/thread108723.html"]but you already posted here[/URL]!

Member Avatar for jephthah
0
63
Member Avatar for snoopy198520

line 20: the >> operator will not allow you to put spaces in the filename, such as path with spaces line 22: fflush(stdin) is non-standard and not supported by may compilers. Unfortunately, there is no standard way to flush stdin. But if you use [icode]std::cin you can use cin.ignore(1000,'\n'); [/icode] …

Member Avatar for Ancient Dragon
0
78
Member Avatar for zoner7

>>I am trying to print chars as numbers. I'm just wondering how to do this. Easy [code] char c = 'A'; printf("%d\n", c); [/code]

Member Avatar for Ancient Dragon
0
140
Member Avatar for Ancient Dragon

Happy Easter everyone, even to those of you who are not Christian. I worked last night at Wal-Mart and I can tell you we sold out of almost everything eatable -- was almost like Christmas. 10:00 p.m. and there were very very long lines. But that's not the point of …

Member Avatar for ddanbe
0
533
Member Avatar for aashishn86
Member Avatar for Narue
-1
289
Member Avatar for smitem03

You are going to have to tell us what that program does not do that you want it to do, or what it does wrong. We are not clairvoyant nor are we mind readers.

Member Avatar for Ancient Dragon
0
164
Member Avatar for Dewey1040

>> while( ch1 != EOF ){ That won't work because (1) ch1 must be an integer, not char and (2) EOF is not known until it attempts to read beyond end-of-file, not before. Don't read the file one character at a time, but one line at a time. Use fgets() …

Member Avatar for Ancient Dragon
0
83
Member Avatar for dimitriz5

If you use google you might be able to find a calculator program. Otherwise, please follow the links in my signature.

Member Avatar for peachville
0
176
Member Avatar for bolx

1) Move the structure definition in lines 49-55 up above any functions, about line 13 because it makes better overall program organization. Most programs are organized to have all includes at the top followed by structures, classes, enumerations (in any order or in header files), globals and function prototypes. You …

Member Avatar for bolx
0
141
Member Avatar for brechtjah

Do a print screen then attach the bitmap so we can see what you mean.

Member Avatar for jbennet
0
161
Member Avatar for rock9449
Member Avatar for rania_s

line 47: breaks are not used with if statements, so delete them. What don't you understand about your program?

Member Avatar for Ancient Dragon
0
112
Member Avatar for andreasd

On your Mobile 5.0 computer, after exiting the application check the computer's memory to see that it really exited and not just hidden. Also, make sure the program closes the port before exiting. What is it trying to do in that tight loop ? Trying to open the port, but …

Member Avatar for Ancient Dragon
0
102
Member Avatar for group256

PointerArray is a two-dimensional array, right ? You have to allocate both dimensions [code] PointerArray = new int *[HEIGHT]; // allocate an array of int pointers for(int i = 0; i < HEIGHT; i++) PointerArray[i] = new int[LENGTH]; [/code] The above will allocate what would be statically allocted like this: …

Member Avatar for group256
0
166

The End.