Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
1 Endorsement
Ranked #858
Ranked #2K
~17.6K People Reached
Favorite Tags
c++ x 51
java x 24
php x 14
c x 6

44 Posted Topics

Member Avatar for andrew.mendonca.967
Member Avatar for phorce
0
4K
Member Avatar for Sci3nc3F1cti0n

> int ascii[size - 1]; It should be of size 'size' not 'size-1' and its index will run from 0 to size-1. > hash[i] = ascii[i]; While you are using string class you would be better off using string library function to append the character to the string thus assuring …

Member Avatar for nchy13
0
421
Member Avatar for andrew.mendonca.967

Your variable words is of data type char\*\* while longest and shortest are of data type char\*. So, in words you ned to specify the index of word(char\*) in order to compare with shortest or longest. In line 56, you are trying to access words[100][16] which is out of bounds. …

Member Avatar for nchy13
0
268
Member Avatar for lloydsbackyard

It may be the case that you are desired to report some implementation along the lines of STL vector class. Just saying...

Member Avatar for Kenney_1
0
257
Member Avatar for nchy13

HI, I am trying to set the consecutive pixels to a specific color so as to obtain a line. Though, I know there is a built in function for drawing the line, but I am interested to do it without using any GL primitive. This is the display function as …

0
169
Member Avatar for pooja.singh.3950

> it means there will be only one destructor in class to destroy all the objects....... I would like to point out that a destructor if called by an object destroys that particular instance of object. Each object should call the destructor separately to remove their corresponding instances.

Member Avatar for nchy13
0
245
Member Avatar for nchy13

This is the code which put an extra line to the std::string array. I am here trying to print last k lines of file. Any help is appreciated. #include <iostream> #include <fstream> #include <string> using namespace std; //file.exceptions(ifstream::eofbit | ifstream::failbit | ifstream::badbit); void print_last(unsigned k, string file_name) { string *data=new …

Member Avatar for nchy13
0
825
Member Avatar for nchy13

I stumbled upon the fact that one can't bind a temporary variable to a reference unless it is a constant and found it to be indeed true in the given code. However, i am not able to find out the difference in my other code snippet where I didn't use …

Member Avatar for nchy13
0
840
Member Avatar for nchy13

This code only print characters until char value is 0 but surprisingly it output characters only upto first blank space. I checked their ASCII values and surprisingly ASCII value of space(' ') character was output by program as 0. I couldn't get it. Any help is appreciated. #include <iostream> #include …

Member Avatar for AndrisP
0
339
Member Avatar for nchy13

I intend to perform in-place modification of std::string with the help of a modifier function. In this regard, I looked up on internet and found that pass by pointer method is not recommended. I have few queries in this regard. * If I pass a std::string to the function as …

Member Avatar for NathanOliver
0
960
Member Avatar for nchy13

Following is the code snippet to override exception::what() function, but what I couldn't figure out how removing const-ness of the function produces following null terminated character string "std::exception". What I could think of is that since exception::what() is const its overriding should also be const. But, even if it is …

Member Avatar for mike_2000_17
0
194
Member Avatar for nchy13

This is a program to reverse the string in place. I have used pass by pointer. Interestingly I have changed the pointer in reverse function which is notable by seeing its output but the pointer which was passed in main function still points to the start of string. This is …

Member Avatar for deceptikon
0
167
Member Avatar for new_developer

It is used just like normal char. The only difference is between their size which is 4 bytes in case of wchar_t which is 1 byte in char data ype. Wide characters are used mainly to represent non-English or exotic character sets. Moreover in your code explicitly preceding string literal …

Member Avatar for deceptikon
0
157
Member Avatar for nchy13

hi all. i have implemented Karatsuba algorithm for multiplication of large numbers . when i compile .c file it is giving correct output using followin commands in **linux** terminal. **gcc ulti.c ./a.out < hi.txt** But problem arises when i try to run it in **ARM** using following commands. it give …

0
101
Member Avatar for nchy13

i am getting weird result here. if condition at line 25 is satisfied only 4 times while reading cpuinfo but **cores** is modified each time while loop iterates. i am not able to think of anything that may cause this. any help of any sort is appreciated. #include <stdio.h> #include …

Member Avatar for nchy13
0
354
Member Avatar for nchy13

evrything was fine until i inserted 100 to 125 lines in code. i am wondering what kv is doing wrong as it is not even printing that version file was opened.. any sort of help is appreciated. files included in the code are given below for reference. proc/version file: ** …

Member Avatar for deceptikon
0
241
Member Avatar for nchy13

i want to ask if i can take input from .txt file to run a source file(.s) **using arm-elf-run abc.s** hi.txt. but giving hi.txt is not working like in c ./a.out hi.txt. any help whatsoever is appreciated.

0
120
Member Avatar for nchy13

Terminal shows foloowing error on entering command for "post review". "Unable to find a Review Board server for this source code tree". can you suggest how to set review board server url.

Member Avatar for TrustyTony
0
109
Member Avatar for nchy13

i searched a llot but in vain. can anyone help me with how to include code written using GTK+ as module in a code that uses wxpython as toolkit. any help whatsoever is appreciated.

Member Avatar for Ene Uran
0
195
Member Avatar for nchy13

we can use $_GET method to pass info via url but it shows the info in url like <a href =profile.php?id=$user>click here</a> and in profile.php?id=$user , we can access username via $username=$_GET['id']; is there any safer method to achieve because i don;t want to show the info passed in url. …

Member Avatar for urtrivedi
0
343
Member Avatar for nchy13

everything is workin except window.location .can any one suggest reason for it. thank you in anticipation <?php session_start(); $_SESSION["visiting"]=$_GET['userid']; echo $_SESSION["visiting"]." ".$_GET['userid']; ?> <script type="text/javscript"> window.location="http://localhost/fi.php"; </script>

Member Avatar for rajesh1158
0
135
Member Avatar for nchy13

i am ensuring on both pages i have first of all called session_start(); on one page i declared $_SESSION["username"]=$username; the link of another page is on this page. and another page i tried to print it by echo $_SESSION["username"]; but it showed nothing. i am using php 5.4 with apache …

Member Avatar for nchy13
0
196
Member Avatar for nchy13

i am trying to print " in echo statement. i can't get any method other than <?php echo " " "; ?> which is definitely wrong. help me to find a way out of it. any help is appreciated.

Member Avatar for nchy13
0
162
Member Avatar for maurya10

google it man. i can't get how this post would be useful for the forum.

Member Avatar for maurya10
0
164
Member Avatar for nchy13

hi i am new to [B]socket programming[/B] and we have to do a project in a month. can u suggest some good project objectives which will look on CV. any help is highly appreciated.

0
68
Member Avatar for d.h.2011
Member Avatar for Ahmad Mansour

you should first try on your own. we will help u if you are stuck somewhere but first take first step. u shouldn't expect it to be spoonfed to you.

Member Avatar for PrimePackster
0
92
Member Avatar for nchy13

here, there are two functions in branchpredictor class namely predictor and trainer. [B]what i have pointed out is that predictor is working fine but trainer is not updating the variables of the above class. is it that only first function can access the variables. [/B] if not, can any one …

Member Avatar for JamesCherrill
0
169
Member Avatar for nchy13

i actually learned java only a day ago and we have to submit assignment after two days. i wanted to figure out what i did here with class and function definition is correct. if correct can you help me out with the compilation error. in fact all are similar. it …

Member Avatar for nchy13
0
349
Member Avatar for nchy13

i dont know whats wrong with this program...the compiler compiles the program but when i run it it shows: j[B]ohnrambo@ubuntu:~/Desktop$ java lora Exception in thread "main" java.lang.NumberFormatException: null at java.lang.Integer.parseInt(Integer.java:443) at lunda.l2read(lora.java:24) at lora.main(lora.java:124)[/B] [CODE] class lunda{ String[] la=new String[2048]; String[] lb=new String[2048]; int[] lvalid_a=new int[2048]; int[] lvalid_b=new int[2048]; int[] …

Member Avatar for leodash
0
155
Member Avatar for nchy13

can anybody help me what is wrong in syntax of following [CODE]ihex=Integer.parseInt(s5,16); String bin=Integer.toBinaryString(ihex); System.out.println(bin); if(bin.length()-10 > 0) String orgpc=bin.substring(bin.length()-10); else String orgpc=new String(bin);[/CODE] this is what compiler shows [B]nchy@ubuntu:~/Desktop$ javac bpbc.java bpbc.java:61: error: Syntax error on token "orgpc", delete this token String orgpc=bin.substring(bin.length()-10); ^^^^^ bpbc.java:63: error: Syntax error, insert …

Member Avatar for nchy13
0
217
Member Avatar for nchy13

i have two array of chars of size 12 each having only 0's or 1's. what i am trying to do is that in for loop [CODE]for(i=0;i<12;i++) { int a=1starray[i]; int b=2ndarray[i]; int c=a^b }[/CODE] but every time c gets 0 only. iam not getting it why. can anybody help …

Member Avatar for nchy13
0
2K
Member Avatar for nchy13

i am wondering what is the problem here. here text.txt is the input file. any help will be highly appreciated. [CODE]import java.io.*; public class Main{ public static void main(String[] args) throws Exception { File f= new File("text.txt"); BufferedReader in = new BufferedReader( new FileReader(f)); String line = new String(); line …

Member Avatar for NormR1
0
105
Member Avatar for nchy13

i am quite new to java i used to code in c++ but now we have to program in java which has not been taught. i browsed net but casn't get enough information this is my first code which i managed to get from net [B]i am using GNU java …

Member Avatar for nchy13
0
407
Member Avatar for evilweevil

at line 27, u should not write x=(a+b)/2. it should work fine after this ammendment

Member Avatar for nchy13
0
2K
Member Avatar for nchy13

can somebody help me out by providing link to the stuff related to buffer reader in java to read a trace file and store it in array of string.

Member Avatar for Ezzaral
0
362
Member Avatar for nchy13

what's wrong with it compiler shows: [B]cor.cpp:6:10: error: cannot convert ‘int (*)[10]’ to ‘int**’ in initialization[/B] is it like b is a pointer that is an array of 10 1d arrays i.e, rows. but what shall we write at line 6 to get rid of it. [CODE]#include <iostream> using namespace …

Member Avatar for Labdabeta
0
107
Member Avatar for nchy13

i don't know why but my compiler reads only upto insert statement. this is what compiler looks like: [B]nchy@ubuntu:~/Desktop$ g++ tree.cpp nchy@ubuntu:~/Desktop$ ./a.out 2 insert 0 14 10 85 15 70 20 60 30 50 65 80 90 40 5 55[/B] [COLOR="Red"]i want to implement following input format[/COLOR] 2 insert …

Member Avatar for jmichae3
0
119
Member Avatar for nchy13

my insert function of redblack tree is working good for input checks listed as comments in main() say for 10 to 20 numbers which has included all types of color changes and rotations.. i am providing input of 1000 numbers to be inserted from input file "in 0" attached. i …

0
59
Member Avatar for nchy13

i am working with g++ in linux ubuntu i am attaching input file for which error occurred. this file tries to insert 1000 numbers and then 250th smallest number. this code worked well when i inserted less numbers but it is not working for insertion of 1000 numbers. compiler shows …

Member Avatar for nchy13
0
175
Member Avatar for nchy13

hi all!! i wanted to know the name of book which covers all the basic syntax and concepts of java keeping in mind that i have the basics of c++.

Member Avatar for stevanity
0
118
Member Avatar for nchy13

don't go by the size of code. [U]before inserting search function my code was working fine with insert function. but don't know what is wrong with search fn. or declaration of variables in main().[/U] [B]this is what compiler shows. tree.cpp:316:15: error: cannot convert ‘int*’ to ‘redblacktree<int>*’ in assignment tree.cpp:318:15: error: …

Member Avatar for nchy13
0
165
Member Avatar for nchy13

[COLOR="Red"][B]this is what compiler shows[/B][/COLOR] tree.cpp: In member function ‘void redblacktree<T>::insert(T) [with T = int]’: tree.cpp:187:12: instantiated from here tree.cpp:103:9: error: lvalue required as left operand of assignment tree.cpp:140:9: error: lvalue required as left operand of assignment [COLOR="Red"][B]if u don't want 2 go thru' d code then kindly just tell …

Member Avatar for Narue
0
576
Member Avatar for nchy13

i have included just insert function in redblacktree class. there are[U] no compilation errors but it shows [COLOR="Red"]segmentation fault[/COLOR] [/U]on running. when i am calling insert function [B]it's not even entering into it as it's not printing the cout statement [/B]at first line of insert body. i am using g++ …

Member Avatar for Moschops
0
170

The End.