Posts
 
Reputation
Joined
Last Seen
Ranked #2K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
2
Posts with Upvotes
1
Upvoting Members
2
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
1 Commented Post
0 Endorsements
~7K People Reached
Favorite Tags
c x 17
c++ x 16
java x 6
php x 4
Member Avatar for hg_fs2002

I want to convert this piece of code using this memory layout transformation : https://software.intel.com/en-us/articles/memory-layout-transformations (Array of Structures to Structure of Arrays) Here are the codes before and after applying the transformation and I want to know whether I'm doing it right or not? Before: typedef struct { double x; …

Member Avatar for Hiroshe
0
265
Member Avatar for hg_fs2002

I have this code: typedef struct { int a } array[1]; int main (array var) { if ((var->a) == 0) return 0; } and I want to copy var to a new variable. It seems it should be something like typedef struct { int a } array[1]; int main (array …

Member Avatar for rubberman
0
244
Member Avatar for hg_fs2002

I would like to know how is it possible to pass registers as function arguments in C. Let's say I have something like this: int main() { register a,b; a = b; register c = a; return 0; } I want to extract a = b as a new function. …

Member Avatar for Unimportant
0
383
Member Avatar for hg_fs2002

I am writing a program that needs to know the type of constants. I am wondering if there is any way of getting this in java? Like for constant "2" type is int and for "2.0" type is double.

Member Avatar for JamesCherrill
0
179
Member Avatar for hg_fs2002

I am getting input from terminal using "char *argv[]" parameter in main function. Now, I want to check whether all the inputs are not character (they are not necessarily int, they can be double) but I don't know how to do it here because inputs are pointers and it's not …

Member Avatar for Ancient Dragon
0
130
Member Avatar for hg_fs2002

Is it possible to use tilde (~) in C preprocess directive in the following way? #define a 1 #if ~a==0 ... #endif Generally, I want to know how we can ~ in preprocessor directives?

Member Avatar for deceptikon
0
228
Member Avatar for hg_fs2002

I want to store '\092' (which is backslash ASCII code) in a char variable but Java does not allow me. Does anyone know what the problem is and how I should store that?

Member Avatar for mvmalderen
0
127
Member Avatar for hg_fs2002

When a simple-escape-sequence like '\n' is evaluated, what would be the result? Is it ASCII 10? How I can show ASCII 10 as a character? Isn't it '\n' again? I am confused! Can someone please help me with the issue?

Member Avatar for deceptikon
0
218
Member Avatar for hg_fs2002

I am trying to use such a hexadecimal floating constant "0x0.DAB789B" in java but it gives me java.lang.NumberFormatException. How can I convert hexadecimal float constant to decimal? I know how to convert hexadecimal **int** constant but that does not work for float constant.

Member Avatar for mvmalderen
2
674
Member Avatar for hg_fs2002

I want to assign an array to a pointer variable. The way I am doing it is like this: int array[] ={1,2,3}; int **p_array = &array; (*p_array)[1] = 99; But when I run the program, it fails. Could anyone help me with the issue? Thanks in advance!

Member Avatar for Ancient Dragon
0
98
Member Avatar for hg_fs2002

When we define a variable name using #define in macro like: #define BUFFER_SIZE buff 5, and then in our main function declare a variable which has the same name like: int buff=8, Does the second buff overwrite the first one? I mean generally is a macro definition considered related to …

Member Avatar for deceptikon
0
215
Member Avatar for hg_fs2002

I am using such linked list: private Class Node { public int Num1; public int Num2; } LinkedList<Node> list = new LnkedList<Node>(); Node n = new Node(); n.Num1 = 10; n.Num2 = 100; list.Add(n); but now I don't know how to access Num1 and Num2 using my LinkedList. For example, …

Member Avatar for corby
0
122
Member Avatar for hg_fs2002

[CODE]$stack1 = array(); for($i = 0; $i < sizeof($stack1); $i++) { $data1[$i] = mysql_query("SELECT Co FROM levels WHERE IDLevel='1' AND N='$stack1[$i]' AND IDEmotion='1' ") or die(mysql_error()); $d1[$i]=mysql_fetch_array($data1[$i]); $_SESSION [$i]['G1']=$d1[$i]['Co']; }[/CODE] When I echo $_SESSION [$i]['G1'], it prints correctly but it gives the following notice: ( ! ) Notice: Unknown: Skipping …

Member Avatar for jkon
0
88
Member Avatar for hg_fs2002

I'm developing a website and I want to change the image of a page when NEXT button is clicked. I retrieve the images from my database and of course I do not want to retrieve repetitive images. This is my NEXT button: [CODE]<input type="submit" value="Next" onclick="synchronousAJAX()" style="position: absolute; left: 1085px; …

Member Avatar for diafol
0
2K
Member Avatar for hg_fs2002

I'm trying to assign a signal to another signal, I don't get any error. However, when I simulate my code the R0 and IR signals are UUUUUUUU while my port mapping does not have any problem and doutt signal is correct. [CODE]component RAM is port ( address : in std_logic_vector(7 …

0
46
Member Avatar for hg_fs2002

[CODE] sqlCmd = new SqlCommand(); sqlCmd.Connection = sqlCon; sqlCmd.CommandText = "update trainn set Adultno=Adultno-1 where ID=@pram1 and adult=@pram2 and Adultno>0"; sqlCmd.Parameters.AddWithValue("@pram1", textBox3.Text); sqlCmd.ExecuteNonQuery(); sqlCon.Close();[/CODE] The code is working properly when there is an update,but when it comes to more than one I don't know what to do? The following code …

Member Avatar for hg_fs2002
0
100
Member Avatar for hg_fs2002

I'm creating a linked list,adding the data I've read from file in each node but as I'm trying to print what I hold in nodes my output is some symbols.And even when I cout what I hold in my nodes in ADD function it's ok but as it goes to …

Member Avatar for mike_2000_17
0
98
Member Avatar for hg_fs2002

I have a text which consists of several paragraphs in which each paragraph consists of several lines. I have the number of paragraphs and now I want to store the number of lines in each paragraph in a vector.This is what I've written and doesn't work properly: additionally,a paragraph is …

Member Avatar for vijayan121
0
95
Member Avatar for hg_fs2002

I want to write a function to add nodes to the end of my linked list. My problem is that I don't know how I can have a pointer that always points to the first node of my linked list.Forexample if I write [CODE] Gnode*p = new Gnode; first->link=p;[/CODE] when …

Member Avatar for hg_fs2002
0
95
Member Avatar for hg_fs2002

Hi,Is someone could help me how is it possible to implement Generalized Linked Lists? I've implemented it somehow but I'm not sure it works or not. Now I'm going to print the nodes I've implemented.When I want to declare the print function in class Glist with first1 argument,I get this …

Member Avatar for hg_fs2002
0
1K
Member Avatar for hg_fs2002

Hi,I want to ask how it is possible to read a file without printing newlines? I'm using getline() to read the strings but I want to print all the strings consecutively even if they've been seperated in the file with a new line.

Member Avatar for Ancient Dragon
0
91