2,839 Posted Topics
Re: Number of posts. I'm probably wrong, but here's how I think it works: Until you reach 1000 posts your 'title' will change every 100 posts. from 1000 posts to ????? the title changes every 500 posts | |
Re: Grey means: No unread posts in this forum Yellow means the opposite | |
Re: [QUOTE=joshmo;634199]It looks like you are not reading data from the file.[/quote] I agree. [QUOTE=joshmo;634199] Maybe something like this [code] if(getline(infile,pubcode)=='S'); { //do something } [/code][/QUOTE] I disagree. getline() doesn't return the read data. I guess you mean something like: [code=cpp] string in; getline(infile, in); if (in == "something") //<-- double … | |
Re: First of all: [URL="http://www.catb.org/~esr/faqs/smart-questions.html#urgent"]click[/URL] Next: [URL="http://www.daniweb.com/forums/faq.php?faq=daniweb_policies"]We don't do homework[/URL] here without you showing some effort. problem 1: [URL="http://www.daniweb.com/forums/thread125984.html"]click[/URL] problem 2: write down the math first, and then convert it to a c++ progran | |
Re: [QUOTE=joshmo;632817]Did you remove the stdafx.h? post your updated code here so we can see what you have done[/QUOTE] Yes he did. It's important to [icode]#include "stdafx.h"[/icode] at the very beginning of your program. [code=cpp] #include "stdafx.h" #include <iostream> using namespace std; //etc [/code] If you don't want to use the … | |
Re: [QUOTE=wellibedamned;632845]Hmm, i kinda aint in the mood to dig the net about this, so i guessed i'd post my question here[/QUOTE] In that case: I'm kinda not in the mood to give you examplecode :) You could use GetTickCount() if you're on windows: [code=pseudo] var = GetTickCount(); while() end while … | |
Re: We have a search function for [URL="http://www.daniweb.com/search/search.php?q=tic+tac+toe+c%2B%2B"]that[/URL] Next time, please don't post in a year old thread, but first: search for the answer yourself. If you can't find the answer, post a [i]new[/i] thread with your question more info about the rules: [URL="http://www.daniweb.com/welcomeguide/index.html?TB_iframe=true&height=390&width=672"]here[/URL] | |
Re: [QUOTE=SteveDB;628167] ..\..\..\..\Pers. Docs\Misc\Steve's book\final_draft\Code Angle_Finder.CPP(94) : error C2679: binary '>>' : no operator found which takes a right-hand operand of type 'int (__cdecl *)(int)' (or there is no acceptable conversion) [/quote] Could you post line 94 of your code and if any variables are used in that line, please post … | |
Re: First: WRITING IN ALL CAPS IS CONSIDERED SHOUTING!! And so your thread gets ignored. Next: Why do you keep opening [URL="http://www.daniweb.com/forums/search3725779.html"]new threads [/URL]about the same linked-list program? People gave you advice to improve your code, but you chose not to respond to them. Instead you opened up this new thread: … | |
Re: you're just executing "Rsh aa" ([icode]system("Rsh aa");[/icode]) which isn't a command. To use a string with the system command, do something like: [code=cpp] int main() { string command = "Rsh"; string param1 = " -l"; string param2 = " -n"; //etc //etc string commandline = command + param1 + param2; … | |
Re: If you want to make this in c++, you could use filestreams and getline() for this assignment. The functions you're currently using are to 'c' for my taste. I'll give you a simple demo-app: [code=cpp] #include <iostream> #include <fstream> #include <string> using namespace std; int main() { ifstream in; in.open("yourfile.txt"); … | |
Re: [QUOTE=technogeek_42;578374]where should we start from......[/QUOTE] Read the post above you own. Read the "[URL="http://www.daniweb.com/forums/thread63827.html"]Read me[/URL]:" in this forum. Why do you keep replying to old threads with questions like: "How to start" "i can't understand that..." "and Y? " "who can make me a code of my problemo " You've … | |
Re: You need a decompiler, but all the decompilers I've tried so far give crappy code (if any). [URL="http://boomerang.sourceforge.net/"]Boomerang [/URL]might be a place to start | |
Re: [QUOTE=thehype2049;631116] Im having problems figuring out certain things: 1 - Am i deriving the member variables correctly? If not how should it be done? [/quote] Yup. [QUOTE=thehype2049;631116] 2 - Im not sure how to do this. "write two constructors for each of the three classes; in each case one will … | |
Re: [QUOTE=cam9856;631156] I mean the linkers it tells me to put in dont even work with the GNU GCC Compiler in codeblocks.[/QUOTE] Excuse me? | |
Re: [QUOTE=Jishnu;624570]Or use %u as addresses are of the type unsigned int.[/QUOTE] I'll have to agree with Ed here. %p is specifically for pointer addresses, so why use %u? [URL="http://www.cplusplus.com/reference/clibrary/cstdio/printf.html"]Click [/URL]. That like putting a garbageback over your clothes and calling it a raincoat :) | |
Re: [QUOTE=salman213;630776] How do people make applications, for example, for Linux?[/QUOTE] To make a GUI in Linux, I use [URL="http://www.wxwidgets.org/"]wxWidgets[/URL]. (also works on Windows, Mac etc). But IMO it's not really beginners stuff. On beginning C++ - [URL="http://www.daniweb.com/forums/thread70096.html"]List of c++ books[/URL] - [URL="http://www.cprogramming.com/tutorial/lesson1.html"]starting c++[/URL] - Some [URL="http://www.daniweb.com/forums/thread67837.html"]braintraining[/URL] [QUOTE=salman213] I guess I … | |
Re: Change the %x to %d with the sprintf() use %c when printing the chars this code: [code=c] int main() { char a[25]; int i; sprintf(a,"%d%d%d",0x0000001F,0x00000001,0x00271418); for(i=0;i<8;i++) { printf("%c",a[i]); } return 0; }[/code] works fine for me.. | |
Re: yes [edit] damn, even with only 1 word to type, mitrmkar beat me to it | |
Re: I always use [URL="http://www.crimsoneditor.com/"]crimson[/URL] (free), because it supports not only PHP-syntax highlighting, but also a lot of other languages | |
Re: What visual studio version is this? Did you create a Console-application? | |
Re: Or if your main program runs in a loop you could use the time() function to check the current time against somesort of timemark: [code=c] time_t seconds; seconds = time (NULL); while (1) //this would be your mainloop { // if > 10 minutes if (time(NULL) - seconds >= 600) … | |
Re: Do you [i]need [/i]to use UNICODE? If not, turn it of, and all your problems will be gone. (as AD mentioned) If you do need it: Change this: [ICODE]strcpy(searchPath, "c:\\*.h");[/ICODE] to this: [ICODE]strcpy(searchPath, L"c:\\*.h");[/ICODE] Do the same with all the 'const char *' (== text between " ") and you're … | |
![]() | Re: [QUOTE=Keyaku;630038] EDIT: Also, can I please put my link back? :O[/QUOTE] Nope, it's against the rules. You could post it here:[URL="http://www.daniweb.com/forums/forum75.html"] Show off your Projects forum [/URL] (also Daniweb) where it isn't against the rules :) |
Re: How about using the amazing powers of google: [URL="http://www.google.nl/search?hl=nl&q=design+method+Spiral&btnG=Zoeken&meta="]click[/URL] [quote=wikipedia] The Google web search engine is the company's most popular service. As of August 2007, Google is the most used search engine on the web with a 53.6% market share, ahead of Yahoo! (19.9%) and Live Search (12.9%).[46] Google indexes … | |
Re: Could you post the [i]exact[/i] code your using ? ![]() | |
Re: Let me have a look in my crystal ball... Post your code, and tell us which part works, and which part doesn't etc.. ![]() | |
Re: 134217728 bytes is exactly the same as 128 megabyte. So how much memory does your computer have? Perhaps you have an endless loop somewhere in your code. Could you post the code that causes this error? | |
Re: [QUOTE=Ancient Dragon;629578]That fixed it. Thanks for the help. So apparently I should have created a windows project, not a console project.[/QUOTE] Yup. I've been playing with wxWidgets for a few weeks now, but I have the same experience as vmanes: headaches. :) Perhaps in the future we can make a … | |
Re: I could be wrong, but to make a graphbar without using additional toolkits (like wxWidgets etc), you would need Visual Studio [b] standard[/b] or [b]pro[/b], which aren't free. But you can try the pro-version [URL="http://msdn.microsoft.com/en-us/vs2005/aa718668.aspx"]here[/URL] (90 day-trial) | |
Re: [QUOTE=ericstenson;621105]Starbucks is a coffee house, not a dating service, so if people meet at starbucks, should it just close down and people stop going there? [/quote] No they shouldn't. But Starbucks doesn't have a "singles table" right? [QUOTE=ericstenson;621105] Come on, Ancient... it's not even correct what you say: "DaniWeb is … | |
Re: [QUOTE=kamal85;628803]i need a complete C program to draw a sin curve without any application and the output should be displayed in dos prompt. can anyone please help me[/QUOTE] Here's a sampleprogram that draws a sine with the SetPixel() function (as Clockowl suggested): [code=cpp] #include<windows.h> #include<iostream> #include <cmath> int main() { … | |
Re: [QUOTE=tesuji;628272]Hi QuantNeeds Your for loop is correct. [/quote] No it's not, TacklesMcCaw is right. There's a semicolon in the wrong place: this: [ICODE]for(numStudents > 0; numStudents -= 1[COLOR="red"];[/COLOR])[/ICODE] Should be this:[ICODE] for([COLOR="red"];[/COLOR]numStudents > 0; numStudents -= 1)[/ICODE] same goes for [ICODE]for(exams > 0; exams -= 1[COLOR="red"];[/COLOR])[/ICODE]; this should be [ICODE]for([COLOR="red"][COLOR="red"];[/COLOR][/COLOR]exams … | |
Re: Here's a [URL="http://www.postgresql.org/docs/6.5/static/libpqplusplus.htm"]link [/URL]to the documentation from postgresql | |
Re: [QUOTE=rahiakil;628161]I need some feedback on the C puzzles site [/quote] Then you should have posted in the [URL="http://www.daniweb.com/forums/forum55.html"]website-reviews forum[/URL] :) One tip I [I]can [/I]give you, is to use syntax-highlighting. The code-examples are difficult to read, because they are the same color as the rest of the text (and lack … | |
Re: First: You should use [URL="http://www.daniweb.com/forums/misc-explaincode.html"]code-tags [/URL] when posting code. line 17 of your code: [ICODE]INT TOTALACRES;[/ICODE] C++ is 'case sensitive'. That means that 'INT' and 'int' are not the same thing. This should give you a compilererror. You can't place comments in the code like that. Use [icode]/* comment here … | |
Re: No, you're not going to get help here creating bots. Better luck somewhere else! | |
Re: 28515 is bigger then 2^8 (=256) So only shifting 8 bits is not enough. so the max number you can add would be half an integer = 65535, but you would have to shift 16 bits, because (normally) an integer is 32 bits: [code=cpp] int main(){ /*max 65535 (= sizeof(unsigned … | |
Re: Depends on what 'yer mates' use: MSN, Yahoo, ICQ, etc? Or are you looking for a chat-site? This is an IT-discussion forum. Of course you are welcome to stay here and chat to us :) May I ask how you came here (what did you google/yahoo)? | |
Re: I'm not going to solve every problem for you ('cause there's a lot, sorry). But here are a few: line 45: 1vector<int> sureValues = RecordValues(FinalBoard, i, theRandom)1 You missed a semicolon at the end. But more important (..), you can't assign a value to a vector like that. Recordvalues() returns … | |
Re: [QUOTE=sniper29;626438]what will i write on the **????? [/QUOTE] Nothing. The above example is working code, try it out. If you're wondering what the '**' are for, click [URL="http://www.cplusplus.com/doc/tutorial/pointers.html"]here [/URL]to learn about pointers. Also please read [URL="http://www.daniweb.com/forums/announcement8-3.html"]this [/URL]and [URL="http://www.daniweb.com/welcomeguide/index.html?TB_iframe=true&height=390&width=672"]this [/URL]about using code-tags. It makes your code readable for other people :) | |
Re: [QUOTE=Fiume;626764]The code below, however, does not work... 'grid' holds nothing but 0s when accessed from a child process. (Example: "Proc 1 has found 0, Proc 0 has found 600 "). [/QUOTE] But that's exactly what your programmed: [code] if(procID == root) { grid[0][0][0] = 600; [COLOR="red"]// only grid[0][0][0] has a … | |
Re: Here's your own code properly indented : [code=cpp] //indented code #include<iostream> #include<time> #include<stdlib> #include<stdio> using namespace std; struct node { node *next; long time_start,time_total,time_compare; }; class queue { private: node *head; node *tail; node n; long time_global; public: int count; queue(); void addnode(); void print(); void dequeue(); friend int choose_counter(queue&,queue&,queue&,queue&); … | |
Re: What input are you using when you get the segmentationfault? Because I ran the code and it didn't crash... Two things I [i]did[/i] notice: 1. [code] pw = new float[n*2+2]; PS = new float[n*2+2]; F = new float[n*2+2]; [/code] You never [icode]delete[/icode] the memory you allocated => Memoryleak 2. [icode]float … | |
Re: Same here when I turn off 'Ad-block', loads half the thread waits (45 sec+) and continues. But it never finishes loading. It hangs on three messages: - waiting for [url]www.daniweb.com[/url] - waiting for aj.daniweb.com - waiting for cdn5.tribalfusion.com My guess is that the ad-server has some issues [edit] With Ad-Block … | |
Re: Do you mean something like [code=c] #include <stdio.h> int main () { char* first = "first"; char* second = "second"; first = second; printf("%s\n%s\n", first, second); printf("address of first: %d\naddress of second: %d\n", &first, &second); getchar(); return 0; }[/code] | |
Re: How do you mean 'the other cpp file opens'? Do you want function to be called from another CPP-file, or do you want the user to view the cpp-file's contents? | |
Re: [QUOTE=bookworm619;622951] [code] error C2143: syntax error : missing ';' before '%' [/code][/QUOTE] There isn't a '%' in this program, this error is probably from the getch.h file. Please post the code as Ancient Dragon requested earlier. | |
Re: [URL="http://www.codeproject.com/KB/IP/PDUDecoder.aspx"]link for a program to convert a PDU string to ASCII[/URL] It's in vb.net, but it pretty straightforward, so converting it won't really be a problem. Come back if you encounter difficulties. |
The End.