1,494 Posted Topics

Member Avatar for miskeen

[QUOTE=miskeen;1035838]But, is there any proposed solution to what I'm looking for?[/QUOTE] Your comparing a array of characters(char input[50]) that is supposed to be a C style string("abc")...I would investigate string compare functions

Member Avatar for miskeen
0
130
Member Avatar for jeeter19
Member Avatar for dkalita
0
193
Member Avatar for mr_steve

I'm looking at you main function I can't see where your calling any function to initialize your array. shouldn't you be calling void init_board(); void print_board()

Member Avatar for mr_steve
0
170
Member Avatar for timaquerra

[QUOTE=timaquerra;1034399]hello, i'm making program which repeatedly (through while) gets input from the user ... program should stop whenever user enters "\n" (or enter button)! thanks in advance![/QUOTE] If you mean exit the loop then use break...if you mean exit the program then use exit(EXIT_SUCCESS); If you want to get fancy …

Member Avatar for gerard4143
0
84
Member Avatar for dinamit875
Member Avatar for auracabarcas
Member Avatar for thetechguy
Member Avatar for thetechguy
0
191
Member Avatar for rudz

[QUOTE=rudz;1033274]List at least two possible ways for linking against the math library.[/QUOTE] static and dynamic

Member Avatar for gerard4143
0
81
Member Avatar for ham130489

[QUOTE=ham130489;1032687]I am working in Linux 2.14 kernel, and I have an assignment. I want to save for every process , the files it opens and closes , and the time he did that. for example : for process aaa : opening "file1" opening "file2" closing "file1" opening "file3" closing "file3" …

Member Avatar for gerard4143
0
185
Member Avatar for rudz

[QUOTE=rudz;1032584]plz plz urgent im a beginner in unix. can someone reply asap . what are kernel modules?what role do they plan in building and runnig a kernel?what happens if the linux kernel did not support modules?[/QUOTE] Here's a good link to get you started [url]http://tldp.org/HOWTO/Module-HOWTO/[/url]

Member Avatar for rudz
0
137
Member Avatar for svkers

[QUOTE=svkers;1032365]Thanks for the reply. Yes, I know how to use assembler within C code. But the question is if it is possible to get the program counter of a another program of which the source code should not be altered! MyProg --->get the program counter --> UnkownProg Thanks in advance, …

Member Avatar for gerard4143
0
147
Member Avatar for neithan

This line should probably be: char *frases[cantidad_frases]; [CODE] char *frases = (char*)malloc(cantidad_frases); [/CODE] So that you have allocated the memory...

Member Avatar for neithan
0
162
Member Avatar for wangatang126

Your error message - did it tell you what line the error is on? Because just guessing I would have to say its this line: [CODE] displayArray(nArray[arraynum]); [/CODE] because nArray[arraynum] is an integer not an array of integers

Member Avatar for wangatang126
0
136
Member Avatar for crashovercool
Member Avatar for RobertMW

[QUOTE=RobertMW;1031144]I am trying to write a program that will input a bunch of names into an array of structures under the .name heading. Currently I have what is below to get it to work. But it's not very flexible. You have to input [U]both[/U] a first and a last name …

Member Avatar for Aia
0
120
Member Avatar for Grn Xtrm

[QUOTE=Grn Xtrm;1030969]Hello friends. I am experiencing problems using the getline function in C. I want to use the function to print line numbers next to the text of each line of an input file. I have successfully read in the file and printed its contents line by line. But when …

Member Avatar for Grn Xtrm
0
116
Member Avatar for pagis
Member Avatar for raigs

If you installed a 64 bit version of Linux on a 64 bit box, then the default compiler(gcc) will produce 64 bit code...that is unless you set the appro. switches telling it to produce 32 bit code...

Member Avatar for ankur_
0
173
Member Avatar for relinx

[QUOTE=relinx;1027864]some one help write a program to calculate the sum of the first 20 integers[/QUOTE] We can't/shouldn't write it for you...but we can provide pointers if you show some effort. So what do you have so far...

Member Avatar for ithelp
-2
77
Member Avatar for parth malhotra
Member Avatar for its.avinash

[QUOTE=its.avinash;1025627]Hi all! Please somebody explain me how this snippet is working!! [CODE]main() { float a 4.379; char*p; int i; p=(char*)&a; for(i=1;i<=3;i++) printf("%02X",(unsigned char)p[i]); } [/CODE][/QUOTE] The code simply assigns the address of "a" to the character pointer "p" and then proceeds to check the value of the four bytes at …

Member Avatar for Gaiety
0
139
Member Avatar for rmcummings
Member Avatar for yasaswyg

[QUOTE=yasaswyg;1024855]I need help writing a program that randomly picks a point in a 2D space. Then the user will be allowed to make repeated guesses which point was picked with feedback saying if the user is hot or colder on each guess. Thank you![/QUOTE] Could we see what you have …

Member Avatar for yasaswyg
0
89
Member Avatar for DazednAngry

Could you please use code tags...and this warning "I am getting a warning, assignment makes pointer from integer without a cast." What line is it on?

Member Avatar for gerard4143
0
122
Member Avatar for Gaiety
Member Avatar for suncica2222

I noticed by your imagine that your including Linux header files...So you have this installed on Linux machine? I also noticed that your file is located in C:\ which is Windows...

Member Avatar for gerard4143
0
191
Member Avatar for dmanw100

[QUOTE=dmanw100;1019838]Hello, I was just wondering if the hlt instruction would produce a blinking cursor at the command line until enter is pressed or if its use is not noticeable to the user. Google wasn't too helpful for the specifics of the instruction. Thanks![/QUOTE] That would probably depend on how its …

Member Avatar for NotNull
0
192
Member Avatar for jupiterrise
Member Avatar for jhouns
Member Avatar for riahc3
Member Avatar for seo2005

[QUOTE=seo2005;1019063]I am a beginner in c and would like someone tp help me . My question is why I have to write void before main to execute the c program. #include<stdio.h> void main() clrscr(); { printf("Hello") } This is a very simple program. But I am unable to execute it …

Member Avatar for tux4life
-1
183
Member Avatar for masterjiraya

Just a guess..You have the model set up as small maybe your exceeding the allowed memory or your using an eight bit register value for your jump - it can only jump 256 bytes

Member Avatar for wildgoose
0
398
Member Avatar for newcpp

[QUOTE=newcpp;1017734]I have a question: [CODE]#include <stdio.h> char * chstrswithf(char * a) { while(*a!='\0') { if(*a=='s') *a='f'; a++; } return a; } int main(void) { char string[]="this is a string"; chstrswithf(string); printf("%s \n",string); return 0; }[/CODE] the code above is ok for running. but when I replace the [COLOR="Red"]char string[]="this is …

Member Avatar for gerard4143
0
86
Member Avatar for masterofpuppets

I have no idea why your launching above your tank but you really should be using pygame to handle the graphics... If you can't find any answers then build a projectile log that will log every position the shell has. With this you have a very good diagnostic tool plus …

Member Avatar for masterofpuppets
0
195
Member Avatar for needhelpe

[QUOTE=needhelpe;1016906]HEY I JUST NEED TO PUT THE FOLLOWING: IF((N == 2) && (T CAN'T BE DIVIDED BY 4)) how can I put: CAN'T BE DIVIDED BY 4? I know divided by 4 is : (t / 4). but can not be divided by 4?[/QUOTE] Use the modulus operator %

Member Avatar for shuva
0
126
Member Avatar for Muneeb49
Member Avatar for StaticX

[QUOTE=StaticX;1016495]Hi, Im having a bit of trouble with a problem: Basically, I have an array with a set size,for example [CODE]my_array[40][/CODE] I am trying to figure out how to tell if it has less than 20 characters filled,and if it has more than 20 characters filled. I have tried the …

Member Avatar for Tom Gunn
0
148
Member Avatar for Goalatio
Member Avatar for jcarlos.alvarez

Just curious to what you think an unsigned char is but zeros and ones try compiling this [CODE] #include <stdio.h> #include <stdlib.h> unsigned char xorBufferTemp[8]; unsigned char bufferHexas1[8]; unsigned char bufferHexas2[8]; int main(int argc, char**argv) { bufferHexas1[0] = 15; bufferHexas2[0] = 1; xorBufferTemp[0] = bufferHexas1[0] ^ bufferHexas2[0]; fprintf(stdout, "ans->%u\n", xorBufferTemp[0]); …

Member Avatar for jcarlos.alvarez
0
190
Member Avatar for marshall31415

I notice you have the binding to the configure event rem'd out. Why? Wait are you talking about the desktop width and height? Try this link [url]http://www-acc.kek.jp/WWW-ACC-exp/KEKB/Control/Activity/Python/TkIntro/tkmanual/winfo.html[/url]

Member Avatar for marshall31415
0
3K
Member Avatar for VernonDozier

If you want to see how other language's handle function overloading, try Googling "name mangling" and you'll see the compiler just renames or mangles the said functions names according to some scheme based on the parameter types...

Member Avatar for VernonDozier
0
111
Member Avatar for shahab.burki

[QUOTE=shahab.burki;1014144]Hi, I am doing network programming in C. I want to send Hexadecimal data between client and server. But stuck how C handles Hexadecimal values? I would like to put and example. I am having a variable ACK_CODE 0*81. Now want to send it. Since the send call can only …

Member Avatar for gerard4143
0
140
Member Avatar for Gaiety

Quickly what is .rodata what is .LC0 rodata is read only data and .LCO: is a label As for the other questions try this link [url]http://programminggroundup.blogspot.com/2007/01/programming-from-ground-up.html[/url]

Member Avatar for gerard4143
0
209
Member Avatar for makymakaru

[QUOTE=makymakaru;1012379]Is pass by value and call by reference the same? I mean i know theres no call by reference in C but there is similarity int he output of the two isn't it? why do we use call by value and pass by value? what are its uses?[/QUOTE] Do you …

Member Avatar for Tom Gunn
0
103
Member Avatar for geoffy0404

[QUOTE=geoffy0404;1012540]I know my problem is within the SWITCH CASE!![/QUOTE] You might get a faster reply if you told us what's wrong..

Member Avatar for Aia
0
128
Member Avatar for ubuntuubuntu

Are you using Linux? If you are, you'd be better off trying object dump of the code like: [CODE] objdump -D source.cpp>testfile [/CODE] Then open testfile in a text editor and inspect it there...Gerard4143

Member Avatar for gerard4143
0
351
Member Avatar for chrisname

[QUOTE=chrisname;1010880]Hi :) I'm trying to get the vendor ID using the CPUID opcode. Again, this is inline ASM with C; but it's the ASM that I need help with. The C is fine AFAIK. I'm not sure if it's the way I'm trying to do this, or if my CPU …

Member Avatar for chrisname
0
229
Member Avatar for jjepoy
Member Avatar for hcredence

Well you have [CODE] void *count_lines(void *arg) [/CODE] I would use the void *arg to pass the file handle like [CODE] count_lines(&fh) [/CODE]

Member Avatar for Arcaiz
0
116
Member Avatar for MrNoob

C can be transfered to different machines because the standard library abstracts away may of these details...i.e. The language is the same but each machine gets its own standard library to handle these details. So when you transfer source code between machines and recompile the standard library makes sure everything …

Member Avatar for MrNoob
0
317

The End.