Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
Ranked #2K
~16.0K People Reached
Favorite Tags
c++ x 28
c x 17
java x 8
php x 6

57 Posted Topics

Member Avatar for Mahen
Member Avatar for peter_budo
0
279
Member Avatar for ankara84

Woah woah woah. What's so illegal with 'i=i++'? Wouldn't it just try to increment i, and then set i equal to the original value of i, making the ++ do effectively nothing? That's what it does when I try it, but I don't have a straight C compiler handy.. -Fredric

Member Avatar for Nick Evan
0
2K
Member Avatar for leroytrolley

Like the error message makes perfectly clear, the variable is not defined anywhere before that call. Are you trying to send over the attachment's filename? Judging from your code, isn't that being stored in $name? -Fredric

Member Avatar for fatihpiristine
0
285
Member Avatar for bucsoldier03

Well, one thing that you could do is to take away the couts and use printfs... Use fopen, fprintf, and fscanf instead of the std fstream stuff. Make sure all of your variables for functions are defined at the start of the function (if you have a horrible C teacher …

Member Avatar for pigeonfoot
0
1K
Member Avatar for tayspen

All day. I have a laptop with me at all times, and unless I'm walking somewhere or possibly showering (though that is hardly on a daily basis) I am usually either programming, browsing the Internet, or doing something else that is computer related. In fact, my laptop is usually with …

Member Avatar for mattyd
0
986
Member Avatar for balachandu

[QUOTE=Ancient Dragon]3)how can we delete duplicate elements in an array with o(n) time complexity?(i want the code or algorithm)[/QUOTE] Easy. Go to the spot in the array where you want to delete the element. Copy the next element in the array to that spot, move to the next element. Repeat …

Member Avatar for dilip.mathews
0
146
Member Avatar for namit

[QUOTE=namit]I have writen a scipts in linux its called user.sh i wounder how do i run it in a php script I can if i just run it in command line ./user.sh it works perfect but can i add it into my code. thanks[/QUOTE] You sure can do that. Assuming …

Member Avatar for namit
0
143
Member Avatar for paradox814

There are more than likely server configurations that are preventing you from accessing the file in ~/functions/. This is primarily due to security issues. Also, you probably should specify which user's home directory you want to go from (i.e. ~johndoe/functions/). -Fredric

Member Avatar for paradox814
0
199
Member Avatar for nisaa15

[QUOTE=nisaa15]Well I want to start the search from the root node. How can I represent the edges that the node has? once the computer knows if the edge exists if will follow this edge through to it destination node. My problem is - how do I represent the edges one …

Member Avatar for Daishi
0
301
Member Avatar for cdlinder

[url]http://www.ncsa.uiuc.edu/VR/VR/[/url] I've taken a few classes in developing virtual reality programs. We used the facilities posted above. I wrote code with primarily CaveGL (very similar to OpenGL), using c++. These sort of facilities are fun, but they're pretty useless currently. It is kind of sad. Check out this guy too: …

Member Avatar for Daishi
0
328
Member Avatar for comwizz

[QUOTE=comwizz]I am having this problem to define a function which raises a float y eg 3.5 which is not a whole number to the base x. Heres the code which gives domain error as function pow takes only int values.[/QUOTE] [url]http://www.cplusplus.com/ref/cmath/pow.html[/url] Pow, in the standard C library for mathematical operations, …

Member Avatar for jim mcnamara
0
373
Member Avatar for atrusmre

You can check out CFile, if you want to stick with the MFC stuff and not mess with STL or the C file input/output functions. For CFile: [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_MFC_CFile.asp[/url] As for how to write a string to a file using STL, you should be using the GetBuffer() and GetLength() methods of …

Member Avatar for Daishi
0
167
Member Avatar for nisaa15

[QUOTE=server_crash]Do you mean a tree? ;) I'd say use a map or something along those lines. If there's a java equivalent of the c++ multimap, then go that route.[/QUOTE] There is. Here's a handy little link: [url]http://java.sun.com/j2se/1.4.2/docs/api/java/util/Map.html[/url]

Member Avatar for jim mcnamara
0
210
Member Avatar for ashneet

[QUOTE=ashneet]I made this function and the problem i have is that the Variavle $Time is not available to the whole program and what i mean by that is the function runs but doesn't set the variable to the whole thing and i have tested the function by doing echos. Is …

Member Avatar for sarahk
0
225
Member Avatar for freesoft_2000
Member Avatar for Daishi

This is a very sensitive subject for me, however I am looking for opinions from the tech community on it.. This past year has been screwing me left and right financially. I'll let you all in on what has happened: A year ago, I caught 2 of my landlord's employees …

Member Avatar for Daishi
0
282
Member Avatar for Asif_NSU

[QUOTE=Asif_NSU]I wanted to explore and know about the GUI toolkits available to be used with C or C++. I heard a bit about Qt, GTK, Mingw etc, and there's MFC too. For the moment I am not quite sure which one to start with. Does a programmer need to know …

Member Avatar for Ancient Dragon
0
571
Member Avatar for namit

[QUOTE=namit]How do i use this str_replace with this [email]bla@bla.com[/email] [email]blac@bla.com[/email] [email]namit@namit.com[/email] and so on so i have setup $email = str_replace(" ", ", ", $mail_list); but it will only talk details if i do this [email]blac@bla.com[/email] [email]bla@bla.com[/email] It does not seam to find and replace return[/QUOTE] The 'return' character is …

Member Avatar for zippee
0
215
Member Avatar for winbatch

Why not use a constant pointer to the vector? If the vector is not zero, then make a copy of it inside the function. [CODE] string whateverTwo( int a, const vector<string> *defaultV = 0) { vector<string> stringVector; if (defaultV != 0) stringVector = *defaultV; // ... } [/CODE]

Member Avatar for Lerner
0
264
Member Avatar for smicer

Probably the '.txt' that you are reading is an ASCII file. .jpg and (I think) .doc are binary files. The difference is that ASCII files generally store readable text data, and binary files generally contain non-text data. -Fredric

Member Avatar for Daishi
0
123
Member Avatar for peter_budo
Member Avatar for Daishi
0
142
Member Avatar for extofer

[QUOTE=extofer]You can read about my linux experience here: [url]http://www.gabrielvilla.com/forum/?p=9[/url] and my question is about Gentoo. I decided to install Gentoo, but after printing pages of the installation guide, I could not get too far. Two things??? is there a ditro as good as gentoo (not red hat or mandrake or …

Member Avatar for extofer
0
177
Member Avatar for freesoft_2000

[CODE]public class b { public static void main(String args[]) { a w = new a(); a.prt(); }[/CODE] You're trying to call prt() as a static method of a, which it is not. Shouldn't that be w.prt()? -Fredric

Member Avatar for jwenting
0
225
Member Avatar for kahaj

[QUOTE=Puckdropper] sSaverPtr -> data = filled; Using a struct to form a linked list.[/QUOTE] I think he meant doing something like: [CODE] *sSaverPtr = filled; [/CODE] Which dereferences whatever sSaverPtr points to, and changes the stored value there to filled. -Fredric

Member Avatar for kahaj
0
145
Member Avatar for nabil1983

Well, if you don't know what is wrong with it, you can't expect anyone else to know what is wrong with it. What problem is it giving you, specifically? It compiles and runs just fine for me, and it even seems to be able to find keys. -Fredric

Member Avatar for SpS
0
209
Member Avatar for ashneet

[QUOTE]Can anyone explain me what does $this->connection mean another words what does $this really do and how it works. [/QUOTE] In PHP, as with most object oriented languages, $this is a reference variable that allows access to members variables of the class $this is used in. For example: [PHP] class …

Member Avatar for Daishi
0
135
Member Avatar for Acidburn

I don't quite understand what it is you're doing here: [CODE] void insert(int array[]) { int value; int *frontPtr = array; // referenced both pointers to first element into the array int *rearPtr = array; // ... if(((*frontPtr == 0) && (*rearPtr == MAXSIZE)) || (*frontPtr == (*rearPtr + 1))) …

Member Avatar for Daishi
0
72
Member Avatar for bigwillis234

Well, try all numbers from D to 1,000,000. I was able to write a program that calculates this in under 20 seconds. BestPi: 3.141592653588651 3126535/995207 I used one loop that went from D equals 1 to 1,000,000, the interior loop is where it gets tricky. Like you said, the ratio …

Member Avatar for Rashakil Fol
0
302
Member Avatar for brian63304

I managed to get your code to compile and run, but I had to kill it after clicking twice. After looking at your code I noticed that you were trying to draw in the glut mouse function, that's a bad idea. There is a reason why you have a draw …

Member Avatar for brian63304
0
150
Member Avatar for kyakobi84

I think you know how to take a factorial of a number, but your variable usage is not good. [CODE] while ( z != 0) { result *= z; z--; } [/CODE] Now, honestly, that works if you first set z to the value of whatever you want to take …

Member Avatar for alloy_zeus
0
267
Member Avatar for jaxy

[CODE] int i = 5; // Or number in the ascii table. System.out.format("%c ", (char)i); [/CODE] [url]http://www.lookuptables.com/[/url] Is that what you mean by special characters? -Fredric

Member Avatar for jwenting
0
158
Member Avatar for manishgurnaney
Re: C++

A final class? You mean like a final variable in Java? I haven't heard of that before in C++. But to answer your question about making private constructors, the only reason why I could see you doing something like that would be in this case: [CODE] class Something { private: …

Member Avatar for Narue
0
92
Member Avatar for ramcfloyn

Isn't std::string the ANSI string? Why are you not using std::string? If you were you could just do... [CODE]result.erase(result.find(' '));[/CODE] To remove one space... -Fredric

Member Avatar for Ancient Dragon
0
371
Member Avatar for smallville

[CODE] #include <iostream> using namespace std; int main() { int i, j, lines; cout << "This Program creates Christmas Trees." << endl; do { cout << "Please enter a number between 1 and 30" << endl; cin >> lines; }while (lines < 1 || lines > 30); for(j=0; j<lines; j++) …

Member Avatar for smallville
0
314
Member Avatar for Daishi

I happen to be writing a very simple text browser, and I'm having a problem connecting to servers using HTTP1.1 GET messages... HTTP1.0 works fine, I just have a string like this: [CODE] const char *request = "GET / HTTP/1.0\n\n"; [/CODE] This works great, and I receive my html back …

Member Avatar for Daishi
0
169
Member Avatar for Electrohead

The color schemes (note the plural) and the banners make me wonder what I'm looking at... Other than that the content and people are there. :-P -Fredric

Member Avatar for goldeagle2005
0
309
Member Avatar for spaceytrin

Just store the sum totals in an 11-element array of ints. (there are 11 possible combinations for the sum of two 6-sided dice) [CODE] int num[11]; for (int i=0; i<36000; i++) { // ...Calculate the two die rolls randomly.. num[die1 + die2 - 2]++; } [/CODE] That should get you …

Member Avatar for spaceytrin
0
128
Member Avatar for vitabrits

I'm kind of confused as to what the ' character is too... Are you sure it isn't one of the logical AND or NOT characters? Did you copy the problem down right? [url]http://en.wikipedia.org/wiki/Boolean_algebra[/url] -Fredric

Member Avatar for Drowzee
0
147
Member Avatar for server_crash

Our town has a lot of squirrels, but it would be unheard of to shoot one (and would probably get you jailed), let alone eat it. Now, I have a friend who goes to college a few hours South of where I live. I went down there to visit him …

Member Avatar for etechsupport
0
291
Member Avatar for Opopp

[QUOTE]I played GTA for like an hour and thought it was a boring game and never played it again.[/QUOTE] I can think of three different visuals while playing that game.. The first is driving around a city, the second is walking around a city, and the third is having your …

Member Avatar for Daishi
0
171
Member Avatar for winbatch

[CODE] test.insert(pair<int,int>(a,b)); [/CODE] That works for me..? -Fredric

Member Avatar for winbatch
0
367
Member Avatar for Gotcha

The first one is obviously a geometric series, google is your friend if you haven't had that level of math yet. Don't mess with the second one. n! is O(n!), and it is also O(n^n) (but not Big-Theta of n^n). -Fredric

Member Avatar for Daishi
0
84
Member Avatar for bsdpowa

[CODE] node* p_before = find_element(number, k_beginning); [/CODE] What is k_beginning? Is it a node? Is it a number? Is it suppose to be p_beginning? In any case, that code shouldn't truncate the end of the list. But it still looks like bad code, what happens when you try to add …

Member Avatar for bsdpowa
0
369
Member Avatar for BenBen84

I've heard of problems with MSVC++ 6.0, where everything runs fine when you're just running it from MSVC, but when you go to run it in its release/debug folder it crashes. If the program was a missing dll then an error message should pop up when you try to run …

Member Avatar for BenBen84
0
334
Member Avatar for cppforlife

[url]http://hjs.geol.uib.no/cplusplus/[/url] Looks like a good place to start. -Fredric

Member Avatar for cppforlife
0
122
Member Avatar for server_crash

When you volunteer to sign up for the military you should accept the risks and understand that it isn't some picnicing free ride through college. This mother thinks that her son's life was wasted, but she has already spoken with Bush and was unable to get through to him. Now …

Member Avatar for bluedos82
0
668
Member Avatar for Daishi

Hello everyone! I figured I would introduce myself here, where all the other new comers seem to have posted...I hope my making of a new thread for this isn't annoying to anyone. I ran into this site while looking for some answers to a few Java questions I had this …

Member Avatar for Sam Simpson
0
209
Member Avatar for Continuous

[CODE] ... bool CheckDate( int day1, int month1) { int day1, month1 = 0; ... [/CODE] Two things I see wrong there. First, if you want CheckDate to be a method of class dateReport then you need to add dateReport:: before the method name, like... [CODE] ... bool dateReport::CheckDate( int …

Member Avatar for nattylife
0
238
Member Avatar for Daishi

I saw an example function for some unknown algorithm in a book that was explaining big theta/o/omega notation. I understand how it all works, but this example is throwing me off: f(n) = 3n^2-2n-10 And what I'm wondering is this: What kind of operation could you possibly do that would …

Member Avatar for Daishi
0
128
Member Avatar for princeinc

:rolleyes: You must be in the most difficult beginning programming class imagineable.

Member Avatar for freesoft_2000
0
118

The End.