Posts
 
Reputation
Joined
Last Seen
Ranked #313
Strength to Increase Rep
+9
Strength to Decrease Rep
-2
64% Quality Score
Upvotes Received
73
Posts with Upvotes
67
Upvoting Members
36
Downvotes Received
52
Posts with Downvotes
51
Downvoting Members
13
21 Commented Posts
~224.59K People Reached
Favorite Tags
Member Avatar for omGac0W

Learn this basic rule of putting brackets .... This will make coding less of a night mare Each time you introduce a new if/ for in a function press tab... For example [CODE] void func1() { for(;;) { if() { } } }[/CODE]

Member Avatar for chriswelborn
0
554
Member Avatar for shubhamgore
Member Avatar for markanderson4
-6
866
Member Avatar for elexender

[QUOTE=Narue;1553385] Though it would be a good idea to support a generic mount point in your C code, because the mount point could change with USB devices: [code] # mkdir /mnt/usbj # mount /dev/sda1 /mnt/usbj [/code] [code] file = fopen("/mnt/usbj/file.txt", "a+"); [/code][/QUOTE] Can you please explain the effect of this …

Member Avatar for Erkan_1
0
2K
Member Avatar for peter_budo

For those starting out to develop apps for iPhone check out the Stanford University Lectures on the same. The lectures are pretty descriptive and contain lots of examples. This the [URL="http://www.youtube.com/watch?v=xQzLHgls63E&feature=channel"]link[/URL] for the 1st lecture. You can find out the remaining lectures from the related videos tab

Member Avatar for Rajeev Kumar_1
9
3K
Member Avatar for abhimanipal

Hi Guys, I am trying to teach myself templates and I keep getting lost in all these compilation errors. Here is the latest // This is the interface for the base class template<class V, class I =int> class Array{ private: vector<V> myStore; public: Array(); Array(I size); Array(I size, V value); …

Member Avatar for abhimanipal
0
247
Member Avatar for abhimanipal

Hi Guys, I am trying to teach myself templates in C++. My current assignment is to create a matrix class by using vector of vectors. I have got most of it done but my code is crashing when I try to overload the random access operator in my matrix class. …

Member Avatar for deceptikon
0
441
Member Avatar for walas

Why dont you try coding one function at a time, compile it.. see if it works then go on to the the next function. It will make life a whole lot simpler for you.... Also learn to format your code.It will be much easier for you to read it

Member Avatar for syker111
0
617
Member Avatar for ppotter3
Member Avatar for magadascar
0
2K
Member Avatar for k3na26

Maybe you want to add the total points that the student has scored. Maybe you dont want to keep resetting the variable which is supposed to keep track of how many grades the student has got

Member Avatar for satabios
0
3K
Member Avatar for abhimanipal

Hi everybody, Please excuse the noob question as I am new to STL in C++. I am trying to write a very basic program which uses iota. However my compiler is complaining that iota does not exist in algorithm. Some other forums suggested including <backward/algo.h> as iota could have been …

Member Avatar for mike_2000_17
0
2K
Member Avatar for abhimanipal

Hi Folks, Here is another noob question. I am trying to write a simple predicate for the find_if function in STL. Here is my code #include<iostream> #include<vector> #include<algorithm> #include<iterator> using namespace std; class InRange{ const int& low; const int& high; public: InRange(const int& l, const int& h): low(l), high(h){} bool …

Member Avatar for Saith
0
398
Member Avatar for abhimanipal

Hello everybody, I am trying to teach my stl and after writing some basic programs I have hit a road block. I have an iterator which I am trying to pass to a function template Here is my function template template <class T> void display(typename vector<T>::iterator start, typename vector<T>::iterator end){ …

Member Avatar for abhimanipal
0
174
Member Avatar for seriousgeek

I dont know if this is a stupid question, but if the language is not English then how do you expect to take user input ? Well I got the answer for my question.. Apparently key boards/ emulation software for non english languages are a common thing

Member Avatar for amaithianantham
0
331
Member Avatar for arc45

What part of file handling is confusing ? There are 4 basic operations 1. Read --> Read the contents of a file . Use fread for this 2. Write --> Write to a file . Open the file is write mode and then use fwrite for this. 3. Append --> …

Member Avatar for shinnoon
0
2K
Member Avatar for tquiva

Why do you need the function swap big ? You do the usual if else thingy in the function reorder. Anyway you have pointers to the variables a,b,c as function parameter. You do the if else thingy and put the values in correct order in the variables if else. Some …

Member Avatar for larsake27
0
746
Member Avatar for digitalhead

I see that this thread has been marked as solved but I had a quick question for the OP. Did you handle the case when the Directory contained sub directories as well ?

Member Avatar for ashok.bandari88
0
218
Member Avatar for angelfriend89

Can you add some log statements to the code to narrow down the location where the seg fault appears?

Member Avatar for Salem
0
359
Member Avatar for debasishgang7

I [B]prefer[/B] to pass arrays like this [CODE] void name(char *game, int length) { //your void function here } int main() { char game[4] = {'S', 'R', 'D'}; name(game,4) return 0; }[/CODE]

Member Avatar for abhimanipal
0
179
Member Avatar for logicmonster

Put a start time and end time before the start and end of the function. You should start seeing differences in speed of execution after the number of nodes in the tree cross a certain threshold.

Member Avatar for abhimanipal
0
131
Member Avatar for logicmonster

Even after you use fgets you will still have to use some if elses to check if the input violates the range restrictions

Member Avatar for abhimanipal
0
184
Member Avatar for debasishgang7

What if the text file contains more than 8 characters before a \n is present? The program will try to store the 9 char at cmd[8] . This will lead to a crash

Member Avatar for abhimanipal
0
187
Member Avatar for debasishgang7

Also your array contains 4 chars (A,B,C,D). Why are you running the loop from 0 to 6 ?

Member Avatar for abhimanipal
0
162
Member Avatar for arshi9464

I am not a 100% sure on this but I believe pointers work with logical memory. When a C program is compiled, the compiler works in such a manner that the program can be placed any where in the physical memory. I dont think that you can access a physical …

Member Avatar for TrustyTony
0
145
Member Avatar for mchin131

I am sorry but I could not follow your problem statement. Can you please re word your problem statement in a more simpler manner

Member Avatar for NathanOliver
0
139
Member Avatar for sharma89bunty
Member Avatar for Komerad

Please post the complete problem statement .... I have no clue what was written in the "other guys" post and have no desire to go hunting for it

Member Avatar for Komerad
0
1K
Member Avatar for super.mina

Basically this problem is identifying "strings of interest" log / sin / cos / (x) You use the strtok function to identify the start and end of these kind of strings

Member Avatar for WaltP
1
128
Member Avatar for dgreene1210

On line 44 I think both the operands have to be of data type int. I think num4 is of type float

Member Avatar for MareoRaft
0
969
Member Avatar for beatbox32

How about a small description of the problem for the people who do not have the K & R text book ???? From the code you have written I guess you are trying to count the number of spaces / tabs / new line characters in a sentence ? If …

Member Avatar for beatbox32
0
461
Member Avatar for George91340

You are incrementing the x value only inside the if block ... I think you need to increment the x irrespective of the fact if the person is a smoker or a non smoker

Member Avatar for raptr_dflo
0
366