Top Solutions

I have a program that is intended to be a spell checker and I am trying to get it to read one line at time so that the output for the program is correct. It does read the file properly and return the misspelled words, however they are all on line...

where is the error?

I am trying to get this spell check program that I have done so far with a little help. It is not compiling and I need to get it working. can you please take a look and give me any pointers that would help me out.
Thanks

Tags:ARQ Stop and Wait, c source code, TCP programiing

I have this code to turn in next 3 days it is simply supposed to be a sender A transmitting packets to a reciever B which in turn acknowledges it( or nack) it uses checksums and sequence and ack nos for error control. there is an upper layer wch...

Tags:crc8, source, code

I need to understand the following code that calculates a CRC-8. I'm not a C programmer (Java and GUIs are my stuff) so the logic of the program escapes me. I can calculate CRC's by hand but I can't see how this program does it.

I understand the...

Tags:cscan, disk, fcfs, scheduling

I know how these method works, but I'm woundering,
if the request queue is like this: 15, 33, 45, 8, 10, 75, 15, 33
diskhead: 30
So if 50% of the request are for the fixed cylinders, which method{fcfs, scan, cscan, sstf} is likely to have a...

Tags:c++, eclipse, ganymede, curl, mingw

I am creating a program in c++ that uses cURL.

I ran into this error and I need help figuring it out:

make: *** [test.exe] Error 1

I put some screenshots here so you can see.
http://www.pocourl.com/eclipse3.4.2/

Tags:encrypt, decrypt, c, string, simple

I need 2 functions. One to encrypt and string and one to decrypt. Needs to be ANSI C and something simple please :)

The answer provided in: http://www.experts-exchange.com/Programming/Programming_Languages/C/Q_21469189.html

#include...

Tags:1403

HI everyone,

I have a  service written in PRO C that is doing a simple Select from a table.  I have debugged it to make sure that the parameters that are being passed are correct.  I get a return sqlca.sqlcode of 1403 but the when I run the...

Tags:opengl, robot

Hi All,

I am actually doing a robot.The robot can be moved at a number of positions,torso, shoulder, elbow, waist, hips and knees. I should use the following keys presses to facilitate these rotations , 's' changes the rotation of the...

Tags:open, unable, file, input

when I edit any c program in turbo c 2.0 ,these program can be successfully complied but can't be linked . It display "link error:Unable to open input file 'COS.OBJ'".why?even like the flowing:
main( )
{}
If the configuration of  turbo c 2.0...

Tags:create, output, file, unable, error

hi,
I am using turbo C++ Ms mode compiler. It was working fine untill yesterday. below is the program that i wrote last week and i tried to run this today (it was working fine last week)and it gave me the following error. ...

Tags:pipe, unix, c, simple, program

/*
    Simple, simple pipe() sample.
    Main program stdout -> child stdin -> chile stdout -> Main program stdout
    cc spipe.c -o spipe

    To run
    >./spipe
    any text
    any text
    ^D
   
    or
    >./spipe < jim.txt
...

Tags:c, sound, programming

This is a question regarding C Programming: i am looking to generate audio using C Code. for this i am looking to generate a square wave function (does not have to be a square wave can be any wave form really) which plays musical notes which last...

Tags:ascii, value, enter, key

Dear All,

I am developing an application that reads XML file tags. I have a tag e.g

<small>rohit</small>

the application  reads fine, i.e gives "rohit" as output.

But I want to check if "Enter" is also pressed in this tag i.e...

Tags:Binary Bomb, Phase 2, Bomblab

Hello!
I am working on the second phase of the binary bomb/bomblab project, and I am a bit stuck.
Basically, we have to input 6 integers to keep the bomb from exploding - however they must be the 6 correct digits, and you have to find them in...

Tags:C

I have a program in C language for transferring files from one computer to another using RS232 serial cable, but i don't have an idea on how it works and what concept is behind it, can i be explained or atleast provide me a good location where i...

Tags:C

How do I get the computer time in seconds and milliseconds since the epoch?
I am using XCode and coding in C and running on Intel computers. I want to use ftime() but I can't work out how to use it!

I have tried to compile the code given as...

Tags:C++

Hello experts!

Do you know any quick and easy OCR example created with OpenCV please?

Thank you

panJames

Tags:rsa_public_encrypt

Hello,

I'm trying to encrypt a symmetric key using RSA with OpenSSL my code looks something like
(for mingw) : in the example the symmetric key is replaced by the word "hello"

int main(int argc, char *argv[])
{
  printf("\nRSA...

Tags:Linux, Unix, Systems calls, C programming

hi i am new to systems calls, and have been given the following question:
1)Use system calls getpid() and getppid() to report the pid and ppid of your current process?

I think the code shown satisfies the requirements but in terminal when I...

Tags:scheduling, cpu, srtf, algorithm

How to code the Shortest Remaining Time First(SRTF)? I'm having a hard time on coding the pre-emptive part of the algorithm. Thanks a lot.

Tags:C language

Hi there,

I have a problem trying to generate the pyramid below using nested loops:
----------1
---------232
--------34543
-------4567654
------567898765
-----67890109876
----7890123210987
---890123454321098
--90123456765432109...

Tags:C++

Hello everyone, I hate to make my first question as my first post, I would like to become a part of this seemingly great community, but I need to ask a question because I am stumped.

I need to create a Magic Square. This is my homework...

i'm stuck on phase6, i think it is the linked list that is giving me problems


node1           db 76h, 3, 2 dup(0), 1, 3 dup(0), 0F0h, 0A5h, 4, 8

I can get to the last bomb explosion function.... but i can't get past it

when i use...

Tags:c, linux, stat, programming

Hi, I have an assignment to make a program which list files and directories in the current directory (a simple version of ls).  I can not finure out how to convert structures in the stat type to readable form. Here is the code:
...

Tags:consumer, producer, shared, memory, using

I have the following Producer/Consumer program that works well using pthreads, buffer and semaphores. I want to write the same exact program using fork() (instead of pthreads), shared memory, buffer and semaphores. Thank you in advance for...

I'm starting phase 2 but I'm a little confused on what I need to do for it. Do I need to write my own assembly code for this or merely reference some code in the program thats already written?

Level 2: Firecracker (30 pts)

A much more...

Tags:switch, while, c, loop, case

Hello,

I am trying to figure out the do/while loop scenario. Let's say that I have code:

/* Example Case using C */
#include <stdio.h>

#include <ctype.h>
int main(void)
{
do{
char menu = ' ' ;
printf("input menu letter? ") ;...

Tags:vector

the man routine is provided by the tutor and the node was written by the students....the main routine cannot be touched by me or any other student.....but whenever the program exectues.....it gives this for any value of TRACE.
It is likely that...

Tags:libpcap sendpacket inject c programming

Hi!
So I have this little program that will put raw text on the network, and its great.  But I have to hard code in the headers & data all together in hex! Which means this prog is a one trick pony.

char *FinalPacket =...

what is a "version control sheet to the source code of a program".

Hi,
What does "out of bounds" address mean in gdb?
I am reading a core file with gdb, and i see the address as out of bounds.
i.e.
#10 0x00000001000ebc4c in somefunction (
    parameter1=0x6 <Address 0x6 out of bounds>,

Thanks
Jamie

Tags:win32, win32 api, c, png, picture control

I am trying to load a PNG file at runtime into a dialog.  I read that VS 2008 is able to do this, but must be done programmatically.  I have the file in the resource editor, IDB_IMAGE and the picture control IDC_PICT.

But i cant find anything...

Tags:c, substring

How to get substring in C

Tags:wait, stop, protocol, c

Hi Experts
i need some modification in already made that works fine with no error:
I have the following code for sender.c
#include "assign1.h"
#include "sender.h"

extern int sTOr[2];
extern int rTOs[2];

FILE *fp;
static FRAME...

Tags:assembly prog., system development

I've worked for # of hours on it but get couldn't get the solution.Here is my code.

1 int getbuf()
2 {
3 char buf[12];
4 Gets(buf);
5 return 1;
6 }

Level 3: Dynamite
Our preceding attacks have all caused the program to jump to the...

Tags:posix, semaphore

I just recently found out about POSIX semaphores.  POSIX semaphores are a way to synchronize access to shared resources between multiple processes.  Supposedly, they are superior to traditional UNIX sempahores because they are more lightweight. ...

Starting this Buffer Overflow assignment and I'm not really sure how to proceed. Figure I could just use a kick in the right direction. Here is what I've been given:

Also I tried stepping through the code from the very beginning but I kept...

Tags:yacc, lex, calculator

I'm used to compiling (1) a lex definition file and (2) a yacc definition file as follows:

1. lex mylexfile.l
2. yacc -d -l myfile.y
3. gcc y.tab.c lex.yy.c -ly -ll
4. ./a.out

I found this example, and I'm trying to understand it.  What...

I am ahving errors  
C:\Documents and Settings\hariere\Desktop\testcrypto\testcrypto.cpp(67) : error C2065: 'PROV_RSA_AES' : undeclared identifier
C:\Documents and Settings\hariere\Desktop\testcrypto\testcrypto.cpp(101) : error C2065:...

Tags:download

where can i download curses.h from ?

Tags:ip, convert, address, decimal, long

Hello, how do I convert from IP address to network byte order and then back to IP address using char and long?

I have:

char ipaddress[15]='127.0.0.1';
long x;
x=inet_addr(ipaddress);
printf("x=%d\n",x);

but how do I do the reverse if...

Tags:CRC c# cyclic redundency check

Hi All,

Before I go BALD from tearing my hair out I remembered my Experts Exchange account, hopefully you can save me. I am writing some softwear in C# to communicate over serial with a hardware device.

I need to send some commands such as...

Tags:bakery, algorithm, c

Please provide me with the source code to implement Leslie Lamport's Bakery algorithm for Mutual Exclusion. If possible please provide me with the links also.

Thank You,
Sanjay

Tags:socket, clear, buffer

I had set socket buffer like this..

buf_size =16*1024;

err = setsockopt( m_hSock, SOL_SOCKET, SO_SNDBUF, (char *)&buf_size, sizeof(buf_size));

Everything ok while sending data to client...

My question is
I want to clear data in the...

Tags:java, computer science, AI, artifical intelligence, algorithms, decision trees

hello ,

i'm searching for an implementation of the ID3 algorithm in java(or c++) to use it in my application , i searched a lot but i didn't find anything !
i have for example the following table of decisions:

low high high : buy
high...

Tags:named pipes, c++, unix, linux

I'm writing a two small programs in C, one that reads from a named pipe and another that writes to it. The problem i'm having is that the writing program writes to the pipe fine, but the reader never prints out what i've written to the pipe like...

Tags:c c++ unix

Platform: HP_UX,  SUN Solaris etc.
Language: c/c++

I have a program where two or more processes share resources. Only one can change the shared resources but more than one can read them at simultaneously. In order to avoid inconsistent state...

Tags:Microsoft Visual Studio 2008

I've been told in order to call WSAStartup() I must first tell Visual Studio to link to wsock32.lib. Unfortunately I cannot figure out how to do this. I've tried:

Right click on project --> Properties
Configuration Properties
Linker
Input
...

Tags:linked list sorting c

Hi everyone,

I came across with a simpl algorithm to sort a linked list, however it looks in a bad performance, because (please, correct me if I am wrong) it has 2 while (one inside the other), therefore the performance is O(n*n)

Also, it...

I am stuck.  It currently stops after 1 iteration of the child process.  Intructions are in comments at beginning

Tags:bomb, binary

I have a homework in which I have to disassembler the code and figure out how to defuse the bomb. Can anyone help please

thanks

bomb-quiet:     file format elf32-i386

Disassembly of section .init:

08048718 <_init>:
 8048718:      55      ...

Tags:inaddr_any

Hi,
I got a sample of code to bind ip address :

   bzero(&sin,sizeof(sin));
   sin.sin_family=AF_INET;
   sin.sin_addr.s_addr=INADDR_ANY;
   sin.sin_port=htons(PORT);

   bind(sock_descriptor,(struct sockaddr *)&sin,sizeof(sin));
...

Tags:Ubuntu, C, C++, LibSerial, Serial port

I'm using LibSerial on Ubuntu to read and write data on serial port.

At the moment, I'm able to write and receive strings over the serial port, but my code does not work very well: in particular, I'd like to control the reading function in...

Tags:Assembly, gdb, buffer overflow, stack

Hello, I've read 2 other similar questions (links below), but am still not able to understand the concept fully.

http://www.experts-exchange.com/Programming/Languages/Assembly/Q_24860346.html?sfQueryTermInfo=1+10+30+bomb+buffer
...

Hi,

Can someone explain to me how this is used please?
I read several explanation but I still don't quite understand. If you could explan to me in simplest terms, greatly appreciated.
When, why and how do you use it if this makes any sense??...

Tags:fscanf, line

I was using fscanf to read in a file and examine each token of this complete file one at a time for the the occurence of a specific keyword.  However I want to read one line from the file. Examine each token in the line and if then when that full...

Tags:Solaris 10

Hello,
I am running a multi-threaded process on Solaris 10 platform; compiled using SunStudio 12. Sometimes our process is hung; I looked at "truss -p <PID>"; it gives strange errors like this:
truss -p 1739
/6:     nanosleep(0xFAC7BBE0,...

Tags:C, LINUX

Hi Experts,

I have a client-server application using socket to communicate.  At times, the server disconnects the client because the write to the client returns EWOULDBLOCK. I initially thought that the client is not reading fast enough thus...

Tags:Arduino, C, C++, Ubuntu, USB, Serial

I'd like to write an application in C in order to be able to communicate with my Arduino board under Ubuntu.

I connected my Arduino to my PC by using the USB cable and now i'm writing the send and write function to send and receive information...

Tags:visual c, msvcr90.dll, 0x0002464c

I am working with an application, and I get a fault in the application log that states:  Faulting application (application, version), faulting module msvcr90.dll, version 9.0.30411.0, fault address 0x0002464c.  Is there any way to tell what's at...

I'm working on phase three of the bomb and I think I have a general idea on what kind of input I need was wondering if someone could verify.

It looks like I need to pass two inputs and the inputs can vary. The first input would be stored at...

Tags:JNI, Java, Windows

I'm attempting to get my JNI implementation to work on a Windows XP (32bit) machine. My test.java (just a java main[]) is able to load the SWIG shared library dll using the System.loadLibrary("TestJni") but it throws the below exception when I...

Tags:C

Does anyone have Strassen's algorithm for matrix multiplication ? in C

I have to implement the construction of Simple LR parsing table, given the grammar productions in a file and then write the SLR table in another file and if possible parse a given string using the table.
I have attached the file specifying the...

Tags:C C++

I am communicating between a Big Endian and Small Endian CPU and need to correctly order the ints between them.  I tried the following macro code:

// Swap Little Endian to Big Endian and visa versa

#define SWAP_ENDS(A)                    \...

Dear Experts,

i want code for Jacobi Method. Please help me.

Thanks

Tags:GDB, assembly, binary bomb

All,

So I am trying to attempt the famous Binary bomb lab. I am pretty good with most of the textbook problems, and following each assembly line and see what is going on. However, this programming assignment has brought new challenges that I...

Tags:char, const, vs, c

In C,

In the code below, I just want to be 100% sure that I understand the difference between statements (A) and (B):

void try_this(char *p, char *q)
{
       const char*  constptr = p;  // (A)
       char* const constptr2 = p; // (B)
}


(A)...

I am having issues with a c program. The program is to take two text files and merge them into one.

One file contains user names, the other one contains passwords. It should output it to a third file in this format

USERNAME1                ...

Tags:Kernel Mode Driver, Registry Access, C

I've an existing kernel mode driver. I want to count the number of times it is being loaded and save it some where in the registry.

I've already read many pages from the DDK's help about using ZwXXX and RtlXXX functions, but as my background...

Tags:convex, hull, code

hi ppl,
  I need a code in "C programming" or in C++ to find a convex hull for a given set of points on a  2 dimentional plane.
The input should contain a set of 15 points on a 2-D xy plane.
P (x, y)
1 (1, 4)
2 (2, 3)..
..
..
The output...

Tags:battleship, c, program

 (500 pts)
The first part explains the program and what it should do(this is just the first part). The second part is my sourcecode.It compiles correctly,btw.I know it has something to do with my damn loops! Please help! also, i added...

Tags:matrix, c, programming

I am looking into building a program which can perform varying matrix manipulations and calculations as well as function as a sort of matrix calculator, at this time I am looking into the best way to build a GUI for my interface (writtien idealy...

Tags:double, precision, c, float


Hi ...

I'm having problems dealing with floating point numbers in C.

The app we're developing requires great precision (sometimes to the 20th decimal point).

Problem is:

When I do this:

      double abc;
      abc = 8080.9940;
...

Tags:dynamic, programming, word, wrap, printing

I guess my main question is what is 'dynamic programming' and do any folks have any examples, and does dynamic programming = faster processing all the time?  My next is the following:

Ok, so I have devised a solution for a word wrap on an...

Tags:nfa dfa source code c c++

please need an implementation in C or C++ ..

Tags:C programming

Hello, I am new to C programming and need some help on figuring out whats going on inside the following Nested loops.  Thanks for any help.

- I know the first nested while loop prints (1 2 2 3 3 4 4 5 5)
, how can the number 1 be printed...

I'm a beginner in OpenGL and C programming... I'm working on a program allows allows value changes via mouse movement (up/down).  

Currently, the motion function is called via a menu in the OpenGL window.   Now, I also need to activate the...

Tags:nop, asm, use, .asm

what is the use of asm("nop")??

Following piece of code character array B try to get date DDMMYYYY from character arrary A.
Can someone explain what the "0x30" does and how the statements (a), (b) function?

m = 30;
n = 0;
charB[n++] = charA[m++] - 0x30;
charB[n++] =...

Tags:C#

I want to add a combobox list on a DataGridView.  However when I run the datagrid and start to enter the first value on the combobox I get the error

System.FormatException:datagridviewcomboboxcell value is not valid

I am not sure what I am...

Tags:C, C++

I have to write progarm for following problem -
File contain numbers. Numbers can be of 20 digits. I want to write program so that it can print number - with following property

75 * 75 * 75 = 421875 (last two digits are 75)
501 * 501 * 501...

Tags:queue, circular, using, thread, array

Hi All:

I have to implement a circular queue of integers of user-specified size using a simple array. Provide routines to initialize(), enqueue() and dequeue() the queue. Please suggest ideas to make it thread safe.

Regards

sunnybrad

Tags:maze, c, game

Simple maze game using C... Here's what I want to do. ( I am using Dev-C++ compiler)
** game map should be loaded from a file (in the following code, map is generated runtime), and its format should be something like the following....

Tags:double, memory, pointer

i'm  having problem with the folowing piece of code -- it's allocating memory , but while filling up the memory it's failing -- i think the problem is with initializing the double pointer to the address of the block of 3 single pointers  which...

Tags:C++, MFC, VS2010

(I'm using VS2010, C++/MFC on Windows 7).

I've this problem since a while, and i always got arround this problem by using regular controls instead of MFC controls, but i would like to understand how to solve this.

Here's an example of a...

Tags:udp, client, server, echo

Hi
I have written the following UDP echo client / server code using recvmsg and sendmsg. But unfortunately no words are echoed back. How should I modify the code

//UDP echo client code
#include     "unp.h"
#include <stdio.h>
#include...

Tags:C/C++, hide process from vista taskmanager

I have seen many codes how to hide process from windows 9x/XP/2k but never seen from vista.So i need a working code in C++ , what do you think can this be done ?

hi!
anyone who knows how to create a checkers game ( with all the standard rules) using c/c++?
please help, it's urgent!!!!!

i'm trying to draw a circle prefilled with a colour in it

and its a 2D and im using visual c++ and opengl

looking for a simple code

Hi,

I'm trying to import some ole' C files into a cpp program and it just doesn't work :)

I've got a main.c in which I define EXTERN_C as extern C. I've set the project in VC++ set to compile as C++ project. I added some C header files...

Tags:search, first, implementation, c, breadth

Dear all,

Please provide solution for the below question:

Implement Breadth First Search and Depth First Search with a given graph.

Thank you

Tags:reverse, words, sentence

Hi guys, something i couldn't figure out....

Write a function to reverse the order of words

Given a sentence of words in a character array, write a C function to reverse the order of words.

char* reverse_word (char* str);

The...

Tags:now, progress, operation, connect, socket

Using the Socket library on Linux, when I try to have multiple clients connect to a server at once using multiple threads, I get the error: "Operation now in progress."

The man pages say that this happens either when you attempt to connect...

Tags:geoDjango, PostgreSQL, python, sqlall, GEOS_LIBRARY_PATH

When trying to create a geospatially-enabled table using the python sqlall command, I'm receiving problem that is apparently fairly common:


  File "c:\Python26\lib\site-packages\django\contrib\gis\db\backends\postgis\ope
rations.py", line...

Tags:c, turbo

How do you change the size and the font in turbo c for DOS?
I want source/url

I have taken an example of a c program that you previously had for another incident which will take an epoch date such as 1229521513 and covnert it to Wed, Dec. 17 2008 13:45:13.  That is working good if I insert the 1229521513 in the c program. ...

Tags:Mapi, exchange, compile, profile, Visual Studio 2005

I need some help compiling this file in Visual Studio 2005. IT comes from the microsoft website http://support.microsoft.com/?id=171636

I keep getting the following errors when trying to compile it as a console application and setting compile...

Loading Advertisement...

Top C Experts

  1. jkr

    79,928

    Master

    0 points yesterday

    Profile
    Rank: Savant
  2. Infinity08

    69,220

    Master

    0 points yesterday

    Profile
    Rank: Genius
  3. sarabande

    68,324

    Master

    0 points yesterday

    Profile
    Rank: Sage
  4. evilrix

    22,528

    0 points yesterday

    Profile
    Rank: Genius
  5. Zoppo

    20,450

    0 points yesterday

    Profile
    Rank: Genius
  6. ozo

    19,800

    0 points yesterday

    Profile
    Rank: Savant
  7. mccarl

    19,586

    0 points yesterday

    Profile
    Rank: Wizard
  8. duncan_roe

    18,800

    0 points yesterday

    Profile
    Rank: Genius
  9. ambience

    16,552

    0 points yesterday

    Profile
    Rank: Sage
  10. Kdo

    13,964

    0 points yesterday

    Profile
    Rank: Genius
  11. satsumo

    13,000

    0 points yesterday

    Profile
    Rank: Guru
  12. phoffric

    12,160

    0 points yesterday

    Profile
    Rank: Genius
  13. hmccurdy

    10,172

    0 points yesterday

    Profile
    Rank: Guru
  14. fridom

    8,000

    0 points yesterday

    Profile
    Rank: Genius
  15. masheik

    7,572

    0 points yesterday

    Profile
    Rank: Guru
  16. farzanj

    7,332

    0 points yesterday

    Profile
    Rank: Genius
  17. woolmilkporc

    7,300

    0 points yesterday

    Profile
    Rank: Genius
  18. tampnic

    7,000

    0 points yesterday

    Profile
    Rank: Master
  19. eager

    6,300

    0 points yesterday

    Profile
    Rank: Master
  20. TommySzalapski

    6,200

    0 points yesterday

    Profile
    Rank: Genius
  21. HooKooDooKu

    6,052

    0 points yesterday

    Profile
    Rank: Wizard
  22. for_yan

    5,800

    0 points yesterday

    Profile
    Rank: Genius
  23. alexey_gusev

    5,600

    0 points yesterday

    Profile
    Rank: Genius
  24. blu

    5,200

    0 points yesterday

    Profile
    Rank: Sage
  25. CEHJ

    5,000

    0 points yesterday

    Profile
    Rank: Savant

Hall Of Fame