2,839 Posted Topics

Member Avatar for happygeek

Damn, after DMR, Stymiee and Narue, I thought [i]I[/i] was next in line :) But: Congrats ~s.o.s.~! Have fun kicking behinds ;)

Member Avatar for ddanbe
0
186
Member Avatar for Nick Evan

There are a lot of threads asking to add new forums to Daniweb. These questions are usually answered by saying that DW has more then enough forums and I agree. So how about cutting back in some of the less successful forums like the [URL="http://www.daniweb.com/forums/forum14.html"]Computer Science[/URL] forum? In this forum …

Member Avatar for MosaicFuneral
0
303
Member Avatar for jephthah

[QUOTE=Ancient Dragon;921457]Do I really need to ? I've been a member here since the stone ages.:)[/QUOTE] Why not?

Member Avatar for annbytes
0
221
Member Avatar for metdos

[QUOTE=twomers;941221]I go for a grazing cammel double playerLifeForce;[/QUOTE] I choose the Hungarian grazing Homer Simpson : [icode]bool iDuff = true;[/icode]

Member Avatar for Nick Evan
0
113
Member Avatar for Sunyah

[QUOTE=firstPerson;924075] //THAT SHOULD START YOU I HOPE[/QUOTE] Why on earth did you do that?? Here's how [B]I[/B] read this thread: OP (Sunyah): Hi. I got this homework assignment and didn't have the slighest clue on how to make it. But luckily I found this code on the interwebs. Problem is: …

Member Avatar for mrnutty
0
142
Member Avatar for MosaicFuneral

[QUOTE=cscgal;937631]Oh I think I know what's causing this :)[/QUOTE] I bet it's the flux capacitor :icon_cheesygrin:

Member Avatar for Dani
0
182
Member Avatar for tomtetlaw

Here's [URL="http://beej.us/guide/bgnet/output/html/singlepage/bgnet.html"]the best tutoria[/URL]l on the net

Member Avatar for Nick Evan
0
92
Member Avatar for mathavan2009

[QUOTE=mathavan2009;935191] explain the basic concepts.[/QUOTE] C++ is a language that you can use to write programs.

Member Avatar for VernonDozier
0
82
Member Avatar for 143wena

[QUOTE=143wena;935060]our teacher want us to make a menu system or payroll system.. but i dont know how to do it because she only teach us like this.. #include<stdio.h> #include<conio.h> void main() { char name[15}; clrscr(); printf("Enter your name"); scanf("%s",&name); printf("%s",name); getch(); }[/QUOTE] If your teacher has thought you this, she …

Member Avatar for Nick Evan
0
161
Member Avatar for valmiki

[code=cplusplus] #include<iostream> int main(){ std::cout << "........1\n......1 2 1\n....1 2 3 2 1\n..1 2 3 4 3 2 1\n1 2 3 4 5 4 3 2 1"; }[/code] or you could try something with loops. But seriously: You should start by writing these problems on paper. Then step by step …

Member Avatar for mrnutty
0
94
Member Avatar for mandofl

[QUOTE=mandofl;933093]and pass each one in turn to a function that displays the information about the movie in a clearly formatted manner. [/QUOTE] You did not yet make a function to display the structs yet. So you will need to create somethink like: [code=cplusplus] void Display(Moviedata moviein){ // display the thing …

Member Avatar for mandofl
1
7K
Member Avatar for funjoke88

[QUOTE=funjoke88;930803] i have the answer in c++ code can anyone help me change back to c code .thanks[/QUOTE] So you found some code on the interwebs but, too bad for you, it's in the wrong language. And now your asking us to write the code for you? That's [URL="http://www.daniweb.com/forums/announcement8-2.html"]not how …

Member Avatar for chili5
-1
148
Member Avatar for new_divine

In your button handler, put something like: [code=cplusplus] wxFrame* f = new wxFrame(this, -1, wxT("A new window"), wxDefaultPosition, wxSize(800,600)); //for example f->ShowModal(); [/code]

Member Avatar for Stefano Mtangoo
0
112
Member Avatar for jdm

Use could use a function like: [code=cplusplus] bool exists(string filename){ ifstream infile(filename.c_str()); if (infile.is_open()){ infile.close(); return true; } return false; }[/code] the flaw in this function is that it'll also return false when a file does exist but can't be opened.

Member Avatar for jdm
0
88
Member Avatar for StephyGraph

[QUOTE=StephyGraph;932983] Please do email me d code....n thanks for your assistance.[/QUOTE] Haha, but [URL="http://www.daniweb.com/forums/announcement8-2.html"]no[/URL].

Member Avatar for tux4life
-2
158
Member Avatar for Renegard

The problem is that when the class is created, n and m do not have a value yet, so the compiler doesn't know how big you want your array. So you need to dynamicly create the array using new and delete. Here's how I'd do it: [code=cplusplus] class matrix { …

Member Avatar for Nick Evan
0
147
Member Avatar for ITechno

I do not get you people. Why can't you think of a topic yourself, it's not that damn hard. But whatever, here you go: [search]project topics[/search] Or you could try the enormous [URL="http://www.daniweb.com/search/search.php?q=project+topics"]searchbox [/URL]on the top of this page. And here's another [URL="http://lmgtfy.com/?q=project+topics+c%2B%2B"]amazing site[/URL] for you.

Member Avatar for ITechno
0
117
Member Avatar for shou2009

[QUOTE=ithelp;931057]Use lex , yacc , bison, etc. it is not that difficult , give it a try.[/QUOTE] Tell me how this advice will help the op solves his(her) problem, I'm curious...

Member Avatar for Nick Evan
0
298
Member Avatar for jempag

[URL="http://www.cplusplus.com/doc/tutorial/functions/"]Tada[/URL]

Member Avatar for necrolin
0
210
Member Avatar for alberton

You need more then just the header files. How would your compiler know what to do with just the headers? Go [URL="http://mspgcc.sourceforge.net/"]here [/URL]

Member Avatar for jephthah
0
237
Member Avatar for thinker707
Member Avatar for pbt

So you thought : "Hey, [URL="http://www.daniweb.com/forums/post930868-2.html"]that's not a source code[/URL] at all!! gimme gimme gimme"? Stop posting double threads. Do some work yourself, come back with your effort and then maybe we'll help you.

Member Avatar for ithelp
-2
104
Member Avatar for crazyboy

Although Adatapost's solution will compile and work, there's no reason why you should use this (ever). I would choose for an init-function that's called from the constructor. You can always call this function at a different time: [code=cplusplus] class foo{ public: foo(){init();}; ~foo(){}; void init(void); }; void foo::init(){ std::cout << …

Member Avatar for crazyboy
0
739
Member Avatar for gangsta gama

You're still using array, when you should be using vectors. Here's how I'd do it: [code=cplusplus] void ShowInv(vector<string> inv){ cout << "Your inventory:\n"; for (unsigned int i = 0; i < inv.size(); i++) cout << inv.at(i) << endl; } int main() { vector<string> inventory; inventory.push_back("Battle Axe"); inventory.push_back("Armor"); inventory.push_back("Sword"); ShowInv(inventory); cin.get(); …

Member Avatar for Nick Evan
0
139
Member Avatar for Slephnir

In addition: You should initialize [icode]textToEncrypt[/icode] with a value before asking for it's [icode].length()[/icode]. Just to be on the safe side. Also: You should check if [ICODE]argv[0][/ICODE] has a value, before passing it to ifstream to open it. then this : [ICODE]for (int x=0;j-1;x++)[/ICODE] You're telling the compiler to : …

Member Avatar for Salem
0
2K
Member Avatar for serkan sendur

[QUOTE=serkan sendur;927643]even you can speak with scottish accent, so as you can understand scottish english, you can speak with all different accents in the world :) even irish maybe :)[/QUOTE] Don't mix up Scottish and Irish, they are like water and fire :)

Member Avatar for ~s.o.s~
0
383
Member Avatar for DIDL

Here's a good [URL="http://www.daniweb.com/forums/thread63827.html"]start[/URL].

Member Avatar for JameB
0
74
Member Avatar for minime2100

I think a 'C' interpreter might be a too big a challenge for a newbie. How about a [URL="http://en.wikipedia.org/wiki/Brainfsck"]brainfsck [/URL]interpreter? You could use file-acces to load source files, an array to keep track of your datapointer etc..

Member Avatar for Nick Evan
0
132
Member Avatar for veronica_0501

Click [URL="http://eternallyconfuzzled.com/tuts/datastructures/jsw_tut_bst1.aspx"]here[/URL]

Member Avatar for Nick Evan
0
80
Member Avatar for whotookmyname

[QUOTE=whotookmyname;928048] I have done the most of it...what remains is how to replace the first line?[/QUOTE] There are two options: 1. - read the original file in your memory. - delete the file - create a new file and add your line - add all the lines in memory 2. …

Member Avatar for rdrast
0
98
Member Avatar for redman6650e

[QUOTE=redman6650e;927461] I was wondering if anyone had expertise in using time algorithms[/QUOTE] Yes. [URL="http://catb.org/~esr/faqs/smart-questions.html#prune"]Someone [/URL]probably has.

Member Avatar for Nick Evan
0
20
Member Avatar for gretty

Why are you using a global variable 'stat' ? You're passing it to your functions right? So make it local to main.

Member Avatar for m22
0
104
Member Avatar for mrinal.s2008

Here's a [URL="http://www.parashift.com/c++-faq-lite/inline-functions.html#faq-9.7"]link [/URL]for you

Member Avatar for Nick Evan
0
81
Member Avatar for derekc4

You've answered your own question in your code: [code=cplusplus] //////////////////this is what she says is wrong int *arrPtr[numScores]; [/code] But you already did it the right way with "scores": [icode]scores = new int[numScores];// Dynamically create an array large enough to hold all of the test scores[/icode] So change the line …

Member Avatar for m22
0
112
Member Avatar for metdos
Member Avatar for Hiroshe

This: [icode]if year is divisable by 4 and year is not divisible by 100 //leap year[/icode] is not complete. A leap year is a year that's divisable by 4 and not by 100 [B]unless it can be divided by 400[/B]. Other then that, it [I]looks[/I] fine.

Member Avatar for Hiroshe
0
743
Member Avatar for naeem1973

And furthermore, your code isn't c++, it's C (poorly). I strongly discourage the use of system("pause") ([URL="http://www.gidforums.com/t-7105.html"]here's why[/URL]) and also fgetc and fputc. Also, if you want help, learn to use [URL="http://www.daniweb.com/forums/announcement8-3.html"]code tags[/URL].

Member Avatar for Nick Evan
0
187
Member Avatar for sdmahapatra

[QUOTE=tux4life;923511]Some people just get assignments which aren't logical.[/QUOTE] Sorry, I couldn't resist. :icon_rolleyes: [attach]10938[/attach] [quote=Spock]That is illogical captain.[/quote]

Member Avatar for Laiq Ahmed
0
226
Member Avatar for TheFoeHammer

To stop the discussion who should start what in where: [URL="http://www.daniweb.com/forums/showthread.php?t=181085"]Here's what you're looking[/URL] for and why it hasn't been implemented.

Member Avatar for Nick Evan
0
460
Member Avatar for Yaserk88

I'd read the file one line at a time and then parse this line to search for semicolons. [URL="http://www.cplusplus.com/reference/string/getline/"]Getline [/URL]with a delimiter should do the trick. Here's a sample: [code=cplusplus] #include <iostream> #include <sstream> #include <string> #include <fstream> using namespace std; int main(){ ifstream infile("c:/in.txt"); // for example string line …

Member Avatar for Ancient Dragon
0
4K
Member Avatar for Teeb

You do realize that [icode]conjCodis[/icode] never gets a value when you jump in the 'else' part of your code right?

Member Avatar for Nick Evan
1
214
Member Avatar for jephthah

[QUOTE=jephthah;920148]... Super Moderator badge? can i have it?[/QUOTE] You've got my vote. So with the sudden disappearance of Narue, the moderators are free to do anything the want right? I mean: no control what-so-ever until there's another s-mod? I'm getting a vision of a combination of 4chan of Daniweb, which …

Member Avatar for shadwickman
0
204
Member Avatar for xiikryssiix
Member Avatar for xiikryssiix
0
183
Member Avatar for ttqtrang146

[QUOTE=Ancient Dragon;924759]You forgot to tell us what the problem is that that code.[/QUOTE] I think this post was split of from the sticky 'how do I flush the input stream' thread. So perhaps the poster was just giving some suggestions? (although it has nothing to do with flushing the input-stream)

Member Avatar for Nick Evan
0
112
Member Avatar for jephthah
Member Avatar for gretty

At this point I would like to throw in a new word in the discussion. [URL="http://www.cplusplus.com/reference/stl/vector/"]Vectors[/URL]. Sorry 'bout that :icon_wink:

Member Avatar for iamthwee
0
384
Member Avatar for massivefermion

[QUOTE=pywriter;920778].Just tell me how to write a heap data structure class in C++.[/QUOTE] [URL="http://en.wikipedia.org/wiki/Heap_(data_structure)"]heap[/URL] Also look [URL="http://eternallyconfuzzled.com/jsw_home.aspx"]here[/URL] And a [URL="http://code.google.com/search/#q=c++%20heap"] lazy link[/URL] If you want descent information, ask a descent question.

Member Avatar for tux4life
0
202
Member Avatar for Nick Evan

I've already mentioned this [URL="http://www.daniweb.com/forums/post744978-8.html"]before[/URL], but got no reply. I would really like it if we were able to attach pics to snippet (and blogs). Snippets for game-dev, visual apps etc make no sense at all without some pics to demonstrate what they do.

Member Avatar for Dani
0
168
Member Avatar for Para2x

[B]fstream [/B]is not C, it's C++. What language are you writing this program in?

Member Avatar for Aia
0
125
Member Avatar for meshooo007

>>Reply With Quote Oh sorry; here you go: [QUOTE=meshooo007;920657] Reply With Quote[/QUOTE] :icon_wink: Here's some 'research' for you: [URL="http://beej.us/guide/bgnet/output/html/singlepage/bgnet.html"]Beej's guide[/URL] to networking. [URL="http://en.wikipedia.org/wiki/Telnet"]Telnet[/URL] Those two links should get you started. Now try to write some code and come back when you have actually made something.

Member Avatar for Nick Evan
0
117

The End.