Posts
 
Reputation
Joined
Last Seen
Ranked #315
Strength to Increase Rep
+10
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
~230.44K People Reached
Favorite Tags
c x 510
c++ x 209
oop x 8

519 Posted Topics

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
581
Member Avatar for shubhamgore
Member Avatar for markanderson4
-6
873
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
253
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
444
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
620
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
412
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
178
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
423
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
748
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
220
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
362
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
182
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
135
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
187
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
191
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
165
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
151
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
156
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
131
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
974
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
479
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
371
Member Avatar for TomaCukor

1 is kind of possible .... But it is messy Check out this piece of code [CODE]#include<stdio.h> #include<stdlib.h> struct student { void *subjects[15]; }; int main() { struct student s1; int numberOfSubjects; int i =0; printf("How main subject does the student have \n"); scanf("%d",&numberOfSubjects); for(i=0;i< numberOfSubjects;i++) { s1.subjects[i] = (int …

Member Avatar for Schol-R-LEA
0
137
Member Avatar for megha10

Where is the value for no_of_msg_records being set ? Are you sure no_of_msg_records contains the correct value before the if statement ?

Member Avatar for abhimanipal
0
88
Member Avatar for anjoz

Quick question ... Is you problem that you cannot read a 16 bit character or is the problem that you cannot use the toAscii function on a 16 bit character ? I think you might find [URL="http://cboard.cprogramming.com/c-programming/86250-problem-parsing-16-bit-hex-ascii.html"]this[/URL] link useful to read in 16 bit characters .... I do not think …

Member Avatar for abhimanipal
-1
1K
Member Avatar for shimooli

@Narue How does the method described by you handle the case when the binary tree is not complete ie. Some of the intermediate nodes could have 0 (or 1) children

Member Avatar for Narue
0
173
Member Avatar for ChosenOreo

Check out the sourceforge web site ... There you will see many operating systems in various partial stages of development ... Might make more sense / provide more learning to work on a partial os rather than start some thing totally new

Member Avatar for abhimanipal
0
178
Member Avatar for pcmaster
Member Avatar for gman1991

You are repeating the same mistake on line 31 as well Avoid using similar sounding names for variables .grade/ grades .... are very similar. Invariably you will use grade when you mean grades and the program will crash

Member Avatar for abhimanipal
0
164
Member Avatar for fpm777

What is the exact issue that you are facing ? Other things that may help you 1. Dont use feof . Read [URL="http://www.gidnetwork.com/b-58.html"]this[/URL] to know why . 2. Next time please use indentation when you write code / paste code. Its easier for us to read your code

Member Avatar for abhimanipal
0
114
Member Avatar for Web_Sailor

Suppose you did not have a client server program and you had to make a simple username/ password application on that, how would you go about that ? I have given you some hints in the code below. If you can fill out and complete this program then the extending …

Member Avatar for raptr_dflo
0
3K
Member Avatar for TrustyTony

The for loop on line 50 can be reduced to [CODE] for(index = 0;index <i;index++){ // Your printing stuff here }[/CODE]

Member Avatar for Narue
0
1K
Member Avatar for rockerjhr

Can you print the Output of the merge sort ? Also how many points are present in the input ?

Member Avatar for raptr_dflo
0
232
Member Avatar for SQLpower

Can you explain the purpose of each argument in the movePlayer function ? Also what is the function getTitle supposed to return ?

Member Avatar for Sky Diploma
0
206
Member Avatar for markfw

Can you look the C operator precendence tables for the operators *(dereference operator) and +(addition operator) ? Then look at the while loop you have written [CODE] while (!feof(p_file) && i < (size / 8)) { fgets(buffer, 8, p_file); (*p_clauses + i)->_var1[0] = buffer[0] - '0'; (*p_clauses + i)->_var1[1] = …

Member Avatar for markfw
0
123
Member Avatar for spiritsad

What is the exact issue that you are facing ? FYI if you use google you will find lots of examples of linked list code all over internet

Member Avatar for zaraki
0
184
Member Avatar for rEhSi_123

Where are the printf statements in the code snippet that you have posted ? What does read Pattern data do ?

Member Avatar for rEhSi_123
0
194
Member Avatar for jeff4L

In line 31 .... The way you are using the scanf is wrong [CODE]char arr[10] ={}; scanf("%s",arr); // This is the correct way of using scanf [/CODE] FYI scanf should be avoided as much as possible as it has many gotcha's. Its better to shift to fgets

Member Avatar for jeff4L
0
152
Member Avatar for EEETQ

Dude no one is going to go through a 400 line code to find an error. I suggest you to post a smaller piece of code.... Just a random thought I think your issue could be a memory violation.

Member Avatar for NicAx64
0
230
Member Avatar for neilio86

You do not need to use the stl library to calculate the min / max . Try writing the code on your own .. Let me give you a head start For Min. 1. Create a temp variable and give it a value of 30,000 [or any such large value]. …

Member Avatar for pseudorandom21
0
257
Member Avatar for kchyn

The connect system call can be used to connect to a network interface ... (Assuming you know the correct IP address and port number)

Member Avatar for abhimanipal
0
338
Member Avatar for montjoile

The End.