Posts
 
Reputation
Joined
Last Seen
Ranked #2K
Strength to Increase Rep
+5
Strength to Decrease Rep
-1
25% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
3
Posts with Downvotes
3
Downvoting Members
3
3 Commented Posts
0 Endorsements
~9K People Reached
Favorite Tags
c++ x 26
c x 26
c# x 3
Member Avatar for revenge2

[code=c] /*decimal to binary*/ #include <stdio.h> void printBinary(const unsigned char val) { for(int i = 7; i >= 0; i--) if(val & (1 << i)) printf("1"); else printf("0"); printf("\n"); } int main() { int dec; int hold=0; printf("Integer number : "); scanf("%d",&dec); printBinary((unsigned char)dec); } [/code]

Member Avatar for akirue09
0
524
Member Avatar for ambarisha.kn

I want to read all files in a particular folder using C programming. HOw to do this. Thanks. Ex: I have some 5 files in folder named c:\temp. I want to read all files one after another and want to write output file for each input file. The output files …

Member Avatar for Ancient Dragon
-1
1K
Member Avatar for ambarisha.kn

Question: Declare a pointer to a function taking an int argument and returning a pointer to a function that takes a char argument and returns a float. I did code as follows. But it is giving error. Please correct this. [code=C] #include <iostream> using namespace std; float func(int x)(char c) …

Member Avatar for Duoas
0
229
Member Avatar for ambarisha.kn

HI, I new to linux device drivers. I am developing HDLC driver. I dont know how to read and write data in memory mapped address. Please help. /*code*/ #define REG_MAP_ADDR 0x50400000 /* Registers */ typedef struct { u16 MOD; u16 STATUS; u16 TBASE; u16 Tx; u16 TxBD; u16 RBASE; u16 …

Member Avatar for crunchie
0
246
Member Avatar for ambarisha.kn

Hi, I am new to Linux device driver, i am developing HDLC-ip driver. i dont know how to do memory mapping. Please guide me how to do memory map. Please find an attachment with this for list of registers and memory map table.

0
101
Member Avatar for ambarisha.kn

I have 2 forms. Form2 has no minimum, max, close icons. Form2 have to control by form1. i.e minimize of form1 becomes form2 minimize. normal of form1 becomes form2 normal. closing of form1 becomes form2 close. All these are working. but when form1 is behind the screen, i.e if form1 …

Member Avatar for xmen_xwk
0
610
Member Avatar for ambarisha.kn

How to wait for some time while writing to a file. I am appending some text in log file, its giving error as Some other process using this file. How i have to wait untill its free.

Member Avatar for nelis
0
996
Member Avatar for ambarisha.kn

I am trying to do localization of ColumnHeadersDefaultViewStyle property of DataGridView.I need localization in both Japanese and English. While designing the form, i set the Font Style of ColumnHeadersDefaultViewStyle property of DataGridView to "Arial" and changed the Form Language property to "japanese" and set the Font style of ColumnHeadersDefaultCellStyle property …

Member Avatar for LizR
0
194
Member Avatar for ambarisha.kn

Consider d_type=POINT_LONG in the following program. and data.Long=0xA; In the following program i am getting correct output in constDataArea[0],constDataArea[1],constDataArea[2], constDataArea[3] which is oxA, 0x0, 0x0, 0x0. But not able to write the same into ambi.dat file. Some junk value is inserting in the front. and writing 5 bytes instead of …

Member Avatar for ambarisha.kn
0
161
Member Avatar for ambarisha.kn

I wrote the following function and it is working fine, but my problem is i want to write forward pointer address in present pointer field. I will explain in code. please check line numbers 10, 11, 12, 13 in the following code.. [code=c] void create_fbeCodeDat() { int checkSum=0; fwrite(&signature,1, 4, …

Member Avatar for ambarisha.kn
0
200
Member Avatar for ambarisha.kn

I wrote the following function. i want to return fbCodeAddr and tmpAddr to the main function. How to do this? Function is as follows; [code=c] void fbExeCode(int BldCnt) { // for(int BldCnt=0;BldCnt<fbdStepno; BldCnt++) { char *fbCodeAddr; char *tmpAddr=0; char *buffer; int n; fbCodeAddr=(char *)malloc(1024); int stack=0; int totalPin=0; for(int fb=0;fb<fbnodeLst.size();fb++) …

Member Avatar for Ancient Dragon
0
144
Member Avatar for ambarisha.kn

Hi, I am allocating memory for some areas. For DB i need 1024 bytes, for DS 1024*2 bytes and so on, and i initialised address as follows. I initailise devBaseAddr to DB, because DB comes first, and next DC. DB is 1024 bytes , so for DC=DB+1024. This is DC address. …

Member Avatar for ambarisha.kn
0
132
Member Avatar for ambarisha.kn

I have the following function. in this function i am not able to push back in vector. I will explain how it works. if same f_pin will comes in the second iteration compared to first iteration of EventNum loop it will get into if Loop and have to push into …

Member Avatar for ArkM
0
208
Member Avatar for ambarisha.kn

Hi everybody, I want to write enter in a text file. How to do this. I wrote the code as follows. see if i write like this, it is printing one special character like arrow. I want to print in the following line, instead it is printing in single line …

Member Avatar for ambarisha.kn
0
258
Member Avatar for ambarisha.kn

I have input files like this a.iup b.iup c.iup....... i have these input files in a variable called fname; like this char *fname="c:\\iupfiles\\a.iup"; every time i will get file name in this variable. But how to concatenate the variable with some other name like as follows in output file name. …

Member Avatar for ambarisha.kn
0
72
Member Avatar for ambarisha.kn

hi, i have some data in variables of different types.(short, int, long, float, char, double). now i have to create one pointer, have to allocate 1mb memory and have to store one by one in that pointer. How to do this.. plz give some clues to start.. which type i …

Member Avatar for ArkM
0
850
Member Avatar for ambarisha.kn

I am reading 4 bytes in binary file and stored in some variable named as *tmpbuf. i am printing this variable in decimal value like this. printf("%d",*tmpbuf); But now what to do is i want to split 4 bytes into two and want to read those separately and saved in …

Member Avatar for mcriscolo
0
155
Member Avatar for ambarisha.kn

The following is giving output as follows String:Astro.cfg Fail If buff is Astro.cfg, it has to give success output, but it is giving fail. I want to print Success.. Please guide me regarding this pointer usage.. [code] #include<iostream> using namespace std; int main() { char arr[]="Asto.cfg"; char *buff=&arr[0]; printf("String:%s",buff); if(buff=="Asto.cfg") …

Member Avatar for CoolGamer48
0
83
Member Avatar for ambarisha.kn

The following program is giving error as follows. please get me the solution how to debug this error. Error: Debug Assertion Failed! Program: ... File: d:\program files\microsoft visual studio 8\vc\include\vector Line: 1556 Expression: ("this->_Mycont != NULL && this->_Myptr != NULL", 0) [code] #include<iostream> #include<vector> #include<deque> #include<list> #include<algorithm> #include<functional> #include "print.hpp" …

Member Avatar for ambarisha.kn
0
168
Member Avatar for ambarisha.kn

I wrote the code for Arithmetic, relational and binary operations. Here i have intilaised all inputs. I want to give inputs from keyboard instead of intialisation or direct Push_back from loop. How to do this? Please check the following code and please help me to give inputs from keyboard. [code] …

Member Avatar for Nick Evan
0
151
Member Avatar for ambarisha.kn

Container V1: 1 2 3 4 5 6 7 I want to print the elements which are greater than equal to 3 but less than 6. How to do this using Standard template library functions.. We have logical_and, greater_equal and less_equal Predefined Function Objects. But i dont know how to …

Member Avatar for vijayan121
0
87
Member Avatar for ambarisha.kn

Hi, I need some algorithms with syntax to work out logical operations using Standard template library(STLs). Please get me some examples of these or teach me regarding logical operations using STLs.

Member Avatar for ambarisha.kn
0
98
Member Avatar for ambarisha.kn

Hi, I want to replace the numbers which are less than 5 in a container. So i write a code as follows. But it is not working. Please get me the solution for this. Destination container should be V2 itself. Where we have to specify destination container. [code] replace_if(V2.begin(),V2.end(), //range …

Member Avatar for ambarisha.kn
0
103
Member Avatar for ambarisha.kn

i am getting error in following program. what is "iota". Why it is giving an error in the following program [CODE] #include<iostream> #include<vector> #include<algorithm> using namespace std; int main() { vector<int> V(10); iota(V.begin(), V.end(), 7); copy(V.begin(), V.end(), ostream_iterator<int>(cout, " ")); cout << endl; cin.get(); } [/CODE]

Member Avatar for Radical Edward
0
1K
Member Avatar for ambarisha.kn

I want to run the following code. Its giving error as "Fatal Error" not able to open 'print.hpp' . No such file or directory.. I didn't understand what is #include "print.hpp". what type of file it is. shall we have to write this header file before executing the program. [code] …

Member Avatar for ambarisha.kn
0
225
Member Avatar for ambarisha.kn

Hi, How to do arithmetic and relational operations using Standard Template Library.(STLs). Could any one please guide me regarding this. I am new to Standard Template Library.

Member Avatar for mitrmkar
0
276
Member Avatar for ambarisha.kn

Hi, I dont know much about Standard template library(Vectors, Lists, Deque). I want to do one Program which is as follows. Write a program to create a data bank which holds the operator and operands of arithmatic/relational/bitwise(etc.,) operations. (Use STLs) The no. of operand fields(input and output) is variable depending …

Member Avatar for ithelp
0
91