2,384 Posted Topics
Re: > Such as? A quick C,P,&C: ---------- Build Project: 'C++.vpj' - 'Debug' ---------- VSLICKERRORPATH="d:\scratch" main.cpp ****** {BD Software Proxy c++ v3.43a for gcc} STL Message Decryption is Off ****** In file included from c:/progra~1/codeblocks/bin/../lib/gcc/mingw32/3.4.4/../../../../include/windows.h:58, from main.cpp:1: c:/progra~1/codeblocks/bin/../lib/gcc/mingw32/3.4.4/../../../../include/winnls.h:571: error: expected `,' or `...' before '*' token c:/progra~1/codeblocks/bin/../lib/gcc/mingw32/3.4.4/../../../../include/winnls.h:572: error: expected `,' or … | |
Re: Mine is just some letters that rolled out of a random string generator. | |
Re: [threadjack] [QUOTE=chopficaro;543575]hey i got some c homework due Monday and I'm stuck. please help me. I'm going to mark the error lines with **** in place of a tab. [code]**** double difflat2=fabs(lat2-lat3); double difflong2=fabs(long2-long3); **** while (difflat2>6.2832) { **** difflat2=difflat2-6.2832; }[/code][/QUOTE]Riddle me this, since it is something I've wondered about … | |
Re: Maybe look into Accelerated C++. [url]http://www.daniweb.com/forums/thread70096.html[/url] | |
At one time I know attached images must have been different. I was searching for something I had posted with images at one time, I don't recall if they were attachments or links, but they no longer render the same. The example I'm thinking of now shows only the thumbnails, … | |
Re: I've found that following the Javadoc and/or Doxygen type of thing aims me toward better comments. | |
Re: Other info: [url]http://www.discourse.net/archives/2008/02/two_strange_orders_in_the_wikileaks_case.html[/url] | |
| |
Re: [QUOTE=atish00;542782]my final code will be include"sel_sort.cpp" clrscr cout<<"No. of numbers \n" cin>>x; largerst=arr[0]; smallest=arr[x-1]; sorry even I am a new programmer and started c++ just 10 months ago.[/QUOTE]Yikes. | |
Re: If you have the pattern, how can you not know its length? | |
Re: I might paraphrase that deeply nested attempt to fill the array like this: "read the whole array (somehow) into each and every cell in the two dimensional array". | |
Re: [url]http://c-faq.com/lib/randrange.html[/url] | |
Re: [QUOTE=niek_e;542357]and the current char is between 'a' and 'z' subtract 32 from it to make it uppercase[/QUOTE]Lame old hack from decades past superceded decades ago by [ICODE]toupper[/ICODE]. | |
Re: And other odd happenings once in a while: [url]http://minx.cc/?post=254492[/url] | |
Re: Methinks your switch cases need breaks. And you may want to deal with painting yourself in a corner. | |
Re: Would [URL="http://www.adrianxw.dk/SoftwareSite/Consoles/Consoles4.html"]this[/URL] help? Have you been to Microsoft's Console page? [edit]Er, [URL="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/character_mode_applications.asp"]Character-Mode Applications[/URL].[/edit] | |
Re: I think you need to use a cstring as an argument. The standard C++ thing would be to use the .c_str() method. I don't know what the equivalent is for this stuff. | |
Re: [url]http://c-faq.com/lib/randrange.html[/url] | |
Re: I think you're supposed to determine what op is to see what calculation you'd like. And when it comes to division, you'd test for div-by-0 and not do such if that were the case. So, yes, [icode]if ( num2 == 0 )[/icode]. | |
Re: Assuming you mean without using a program, perhaps using pencil and paper to solve each case? The first parameter is passed by value, so it will remain unchanged in the calling function after the function call; the second parameter is passed by reference, so its value may be changed in … | |
Re: Filling a [icode]struct tm[/icode] and doing a [icode]mktime[/icode] will give you a [icode]time_t[/icode]. Then you could perhaps use [icode]difftime[/icode] to compare. | |
Re: I was trying to find an example of setting up a project for multiple source files in MSVC, ones that I'd posted a while back. I found [URL="http://www.daniweb.com/forums/showthread.php?t=24372"]this[/URL], [URL="http://www.daniweb.com/forums/showthread.php?t=26762"]this[/URL], and [URL="http://www.daniweb.com/forums/showthread.php?t=26953"]this[/URL], but it seems that my previously posted links to screenshots now show up only as thumbnails. I think one … | |
Re: I might have a better shot of making sense of it if you attached full source. I'm just not connecting the dots. (Besides, I am curious about little things like [icode]new[/icode]ing and [icode]delete[/icode]ing within this loop as opposed to (re)using a single temporary.) | |
Re: [url]http://www.parashift.com/c++-faq-lite/templates.html#faq-35.16[/url] ? | |
![]() | Re: So besides user input, you've actually made no attempt whatsoever? |
Re: [url]http://www.parashift.com/c++-faq-lite/templates.html#faq-35.13[/url] or the next several. | |
Re: [QUOTE=Nemoticchigga;541447]I am writing a char*, recieving 1 (4 bytes) char at a time. I would like to return the entire read back as a char*.[/QUOTE]This statement is a bit of cause for worry. Are you really trying to write a pointer rather than the text to which it points? Unless … | |
Re: Keep in mind that we have run across many professors who teach quite the opposite of good practice. | |
![]() | Re: [list]Doing [icode]MPH = KPH * 0.6214;[/icode] doesn't magically make the machine Do What You Mean (tm) later on. [*]Use floating point, i.e. [icode]double MPH[/icode] and [icode]9.0/5.0[/icode].[/list] ![]() |
Re: My comment has nothing to do with your code, but I am curious about this: [QUOTE=fmufti;539341]Hi I want to increment file number with date e.g 19-FEB-09-1.dat, 19-FEB-09-2.dat[/QUOTE]Have you ever considered "big endian" date format? that is to say a filename format based on the date such as the following?[list][*]2009-02-19~001.dat [*]2009-02-19~002.dat … | |
Re: One thing that often seems to be overlooked is that corporations -- and by extension CEOs -- try to maximize profits for investors. But the image of the investor is all too often thought of as "some rich guy". What is left out is people who have 401(k)s and IRAs … | |
Re: Could this be the ol' [URL="http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1046476070&id=1043284351"]Why it's bad to use feof() to control a loop[/URL] thing, I wonder? | |
Re: [url]http://www.cppworld.com/forum/index.php?showtopic=505[/url] | |
Re: I'm not familiar with Crimson Editor, but if you've got the BC 5.5 I've used that command-line compiler. If you're more comfortable with starting in a GUI IDE, I'd recommend looking into [URL="http://www.codeblocks.org/"]Code::Blocks[/URL] (and get a recent nightly build). | |
Re: [QUOTE=Duoas;539703]Actually, it is possible. You need to use [B][I]token concatenation[/I][/B]. [inlinecode]#define DEFINE_FUNC( n ) void func_ ## n()[/inlinecode][/QUOTE]How do you propose to do the precompiler looping? | |
Re: [QUOTE=jaffo;538918]I have been doing some searching and can't seem to find the correct syntax to read the data into an array that can later be used.[/QUOTE]Post the code you have, we'll work it from there. | |
Re: [URL="http://forums.devshed.com/showpost.php?p=1656392&postcount=9"]This[/URL] is something similar. | |
Re: Start at the top. Fix the first error. Compile. Lather, rinse, repeat until no errors or warnings. *** {BD Software Proxy c++ v3.43a for gcc} STL Message Decryption is ON! *** main.cpp:139: error: `minor' is not a type main.cpp:139: error: ISO C++ forbids declaration of `parameter' with no type main.cpp:141: … | |
Re: Perhaps post an example that demonstrates your current abilities. | |
Re: Using a beautifier to attempt to better read your code, I can see that syntax errors are an issue. Using [URL="http://www.daniweb.com/forums/misc.php?do=bbcode#code"]code tags[/URL] also assists in displaying this fact. [code=c++]#include <iostream> using namespace std; #include<string> using std::cout; using std::endl; using std::cin; void printbirthstone (int); void printastro (int); void season (int); int … | |
Re: [code=C++]// add code int main(void) { // add code return 0; }[/code] | |
This is a feature lacking here at the moment, so I am interested in comments and feed back for the higher ups. Elseweb this may be my main source of feedback. Here the same feature presently doesn't exist. Since our input is a minority report, please keep your comments relevant … | |
Re: Pray tell, why should we offer assistance toward something that sounds malicious? | |
Re: It means get rid of this unnecessary bit:[code] cin >> year[COLOR="Red"] << endl[/COLOR];[/code] | |
Re: [URL="http://www.daniweb.com/forums/misc.php?do=bbcode"]vB Code[/URL] | |
Re: Library != Header File [url]http://en.wikipedia.org/wiki/Library_%28computing%29[/url] | |
Re: A different translator's versions of the error messages: [quote]list.cpp *** {BD Software Proxy c++ v3.43a for gcc} STL Message Decryption is ON! *** list.cpp:50: error: prototype for `bool List<DataType>::Traverse(DataType, int &)' does not match any in class `List<DataType>' List.h:23: error: candidate is: void List<DataType>::Traverse(DataType, int &) list.cpp:50: error: template definition … | |
Re: For starters: are you really programming for DOS? Plain old DOS. Not a Win32 console or anything, but 20-year-old DOS? |
The End.