2,384 Posted Topics

Member Avatar for Alex Edwards

[QUOTE=Alex Edwards;647739]I just wanted to ask if anyone else had those "wow, looking back..." moments when they get here?[/QUOTE]If that ever stops happening -- learning new things -- programming becomes boring.

Member Avatar for sciwizeh
0
99
Member Avatar for Misterguitar

Nothing standard, and probably something you really don't want to do, but [url]http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1045691686&id=1043284392[/url]

Member Avatar for Misterguitar
0
79
Member Avatar for anuizath2007

Prestandard code, a missing curly brace, and using a value before it's defined?

Member Avatar for anuizath2007
0
97
Member Avatar for Alex Edwards

[URL="http://www.research.att.com/~bs/bs_faq2.html#renew"]Use a vector instead[/URL]?

Member Avatar for Narue
0
141
Member Avatar for jack1234

Are you [icode]new[/icode]ing? If so, that object is on the 'heap'. Are you instantiating an object within a function? If so, that object is on the 'stack'.

Member Avatar for Dave Sinkula
0
64
Member Avatar for iamthwee

Example [URL="http://cboard.cprogramming.com/showthread.php?t=100782&highlight=keylogger"]elseweb[/URL]. Rule 6 reads differently now, BTW.

Member Avatar for ~s.o.s~
0
86
Member Avatar for kzdev

One way: [code=c]#include <stdio.h> int main(void) { const char *Msg1[] = { "xMessage1", "xxMessage2", "xxxMessage3", "xxxxMessage4", "xxxxxMessage5", }; size_t i; for ( i = 0; i < sizeof Msg1 / sizeof *Msg1; ++i ) { printf("%s\n", Msg1[i]); } return 0; }[/code] This might be closer to a direct translation: [code=c]#include …

Member Avatar for kzdev
0
82
Member Avatar for Shadoninja

Compiler errors? Perhaps post them? Are proper header files included? And are you [icode]using[/icode] these from the [icode]std namespace[/icode]?

Member Avatar for Narue
0
181
Member Avatar for seacat123

That's due to the if-else tree: right and down possibilities are checked first. Making up and left priorities higher, you might get this: [code]#include <cstdlib> #include <iostream> #include <fstream> using namespace std; //----------------------------------------------------Print maze void fnPrintMaze(int m,int n,int**a) { for ( int i=0; i<=m-1; i++ ) { for ( int …

Member Avatar for seacat123
0
119
Member Avatar for SunshineLuvr

[quote]main.cpp *** {BD Software Proxy c++ v3.43a for gcc} STL Message Decryption is ON! *** main.cpp:6: warning: `payroll' has virtual functions but non-virtual destructor main.cpp:31: warning: `hourly' has virtual functions but non-virtual destructor main.cpp:45: warning: `salaried' has virtual functions but non-virtual destructor main.cpp: In member function `virtual double payroll::findgrosspay()': main.cpp:73: …

Member Avatar for mitrmkar
1
584
Member Avatar for java_girl

Use [ICODE]%lf[/ICODE] with [ICODE]scanf[/ICODE] for type [ICODE]double[/ICODE]. [edit]But there are a number of indirection issues as well...

Member Avatar for ssharish2005
0
997
Member Avatar for Evan M
Member Avatar for Evan M
0
521
Member Avatar for Black Magic

How about? [code] system("start www.google.com");[/code] [code] system("start http://www.google.com");[/code]

Member Avatar for Ancient Dragon
0
106
Member Avatar for wtf???

[url]http://www.daniweb.com/code/search.php?query=calculator[/url]

Member Avatar for Dave Sinkula
0
63
Member Avatar for mimsc

Might you be missing a comma here? [code] "WHERE rnum > %d \n"[COLOR="Red"],//??[/COLOR] (is_mls_recip) ? ", (srch.office_contact_id - 10000000) office_contact_id, srch.supplier_lr_logo, (srch.primary_agent_contact_id - 20000000) primary_agent_contact_id " : "", [/code]

Member Avatar for Dave Sinkula
0
549
Member Avatar for wtf???
Member Avatar for wtf???
0
116
Member Avatar for driplet

[QUOTE=driplet;643782]In Class A, I read v1 from a txt file and want to copy it to v2 by using strcpy: strcpy(OB.v2, v1); //OB is an object of Class B[/QUOTE] The code is similar to this? [code]#include <iostream> #include <cstring> using std::strcpy; class B { public: char v2[30]; B(const char *init …

Member Avatar for Dave Sinkula
0
169
Member Avatar for FTProtocol

Like this? [code]#include <iostream> int main() { char text[] = "hello world"; std::cout << "text = \"" << text << "\"\n"; std::cout << "text[0] = '" << text[0] << "'\n"; std::cout << "text[0] = " << [COLOR="Red"]static_cast<int>(text[0])[/COLOR] << '\n'; [COLOR="Red"]int value = text[0];[/COLOR] std::cout << "value = " << [COLOR="Red"]value[/COLOR] …

Member Avatar for hacker9801
0
214
Member Avatar for java_girl
Member Avatar for michinobu_zoned

Perhaps you mean to assign the return value of the [icode]atoi[/icode] function to integers and add these integers instead of attempting to 'add' strings?

Member Avatar for dwks
0
2K
Member Avatar for NiNTENDU
Member Avatar for itdupuis

Drill Here. [INDENT]Drill Now. [INDENT]Pay Less.[/INDENT][/INDENT] :icon_razz:

Member Avatar for Ene Uran
0
159
Member Avatar for CoolGamer48

It depends on where you want the names visible and how you address them: that is, your preference.

Member Avatar for Dave Sinkula
0
79
Member Avatar for manzoor

The first part of the 2nd one probably flew right by you: [code]10 9 8 7 6 5 4 3 2 1 0 0 0 [/code]

Member Avatar for VernonDozier
0
91
Member Avatar for mike issa
Member Avatar for govind_kishan

Doesn't Atmel provide such a compiler? Perhaps [URL="http://www.atmel.com/products/8051/thirdparty.asp#compilers"]3rd party[/URL].

Member Avatar for jephthah
0
110
Member Avatar for fishwater00

How about putting in the header? The message means you need Model defined before you reference it in the prototype. [code]typedef struct { int x, int y, int z; }Model; [/code] Don't [ICODE]malloc[/ICODE] static arrays: [code] Model PARA[100]; [COLOR="Red"]PARA=malloc(sizeof(struct Model));[/COLOR] [/code] In the function you'll want to use the [ICODE]->[/ICODE] …

Member Avatar for fishwater00
0
106
Member Avatar for salman213

[QUOTE=Alex Edwards;631585]Edit: Wrong on my part, sorry. Edit2: Actually... I think I got it. a << 3 is the same as a * (2 ^ 3) a >> 3 is the same as a / (2 ^ 3) Correct me if I'm wrong on this.[/QUOTE]Point made: it's obfuscatory and should …

Member Avatar for Alex Edwards
0
344
Member Avatar for totaljj

You could pass the result matrix as a parameter to your function. [code]const int No = 2; void mat_sum (int A[][No], int B[][No], [COLOR="Red"]int C[][No][/COLOR], int length) { for ( int i = 0; i < length; i++ ) { for ( int j = 0; j < length; j++ …

Member Avatar for Dave Sinkula
0
78
Member Avatar for Noe'

Do you need to add the path to your source path? [code]Info :Compiling [COLOR="Red"]C:\bc5\[B]demo1[/B][/COLOR]\firstcproj.cpp[/code]

Member Avatar for tesuji
0
233
Member Avatar for Utter_iMADNESS

In general, never #include source files. Learn about separate compilation and linking.

Member Avatar for Utter_iMADNESS
0
97
Member Avatar for Dave Sinkula
Member Avatar for moogle1979

[QUOTE=jephthah;629929]It might help you if we break out the "return" statement a little bit for readability. So here is an example of his code broken out to an extreme degree. I normally wouldn't write such tedious code for a simple function, but this might make it more clear as to …

Member Avatar for moogle1979
0
319
Member Avatar for remk
Member Avatar for joelbaby

[url=http://msdn.microsoft.com/en-us/library/ms724944(VS.85).aspx]SetTimeZoneInformation[/url]?

Member Avatar for tesuji
0
102
Member Avatar for Alex_
Member Avatar for Alex_
0
911
Member Avatar for Ancient Dragon

Have there been enough *nix-specific threads there to similarly warrant a *nix sibling as well?

Member Avatar for Ancient Dragon
0
136
Member Avatar for arleyquininy

Radical Edward: [URL="http://www.cpp-home.com/forum/profile.php?mode=viewprofile&u=262"]any relation[/URL]?

Member Avatar for Radical Edward
0
158
Member Avatar for Dave Sinkula
Member Avatar for Ancient Dragon
0
73
Member Avatar for nlsna17

[QUOTE=nlsna17]PS. What should i do?[/QUOTE]Show your attempt. (Read the announcement in this forum if you need clarification.) [QUOTE=nlsna17](pls post the complete solution and code.....by the way writE codes in visual C++)[/QUOTE]:eek: :lol: :lol: :lol: :lol:

Member Avatar for Bitto11
0
176
Member Avatar for Brent.tc

As forums go, I'd say Daniweb is fairly lax at picking mods -- no offense to anyone (after all, I was one once).

Member Avatar for Nick Evan
0
226
Member Avatar for hapiscrap
Member Avatar for agabriel

I might do a transpose like this. [code]#include <stdio.h> #include <stdlib.h> int **create ( size_t rows, size_t cols ); void destroy ( int **array, size_t rows); int **transpose ( const int *const *const array, size_t rows, size_t cols); void print ( const int *const *const array, size_t rows, size_t cols …

Member Avatar for Clockowl
0
3K
Member Avatar for mattyd

The problem with atheism is that it requires too much faith. And with known fallible sources. For no benefit.

Member Avatar for ~s.o.s~
3
10K
Member Avatar for macrosoft

[QUOTE=macrosoft]and i get the same error on several different computers.[/QUOTE]Which is...? If you want to do it right, it's [FONT=Courier New]<iostream>[/FONT].

Member Avatar for togayot
0
452
Member Avatar for The Dude

[url]http://en.wikipedia.org/wiki/The_Hunger_Site[/url] [quote]The Hunger Site is [I]not[/I] a charity; it is a for-profit corporation which donates the revenue from its advertising banner to selected charities.[/quote]FWIW

Member Avatar for jwenting
0
278
Member Avatar for GrimJack

[QUOTE=Narue;591831]I showed Dave Sinkula my picture and he tried to convince me that I don't really have blonde hair.[/QUOTE]Musta been was the lighting.

Member Avatar for majestic0110
0
312
Member Avatar for iamnoangel26

[QUOTE=iamnoangel26]Umm i just want to ask how to use an array and when to use them. I just cant get what my teacher is telling. Maybe someone can give me a new idea. That's all thanks :)[/QUOTE]A good hint might be when you are naming your variables item1, item2, item3, …

Member Avatar for gazoo
0
215
Member Avatar for tymk

[QUOTE=tymk;593834]Thanks. I thought of that, so I ran something like:[/QUOTE] Try not to paraphrase code. Work with the real deal.

Member Avatar for Salem
0
5K
Member Avatar for Crushyerbones
Member Avatar for Dave Sinkula
0
107

The End.