19,876 Topics
![]() | |
Hi all, First-time poster and netadmin/infosec guy trying to get into coding. My company uses a SQL Server 2005 database to store customer information and the like, and I'm hoping to learn to interact with it programmatically so I can write and/or customize software to make life a bit easier … | |
Hi Guys, I need some advice on reading an integer from a file. The file would always have one integer. Once the integer is read in, I would use this in 'if else' statement to find the outcome [CODE]f = fopen (fileName, "r"); if (f == NULL) return 0; fread(); … | |
Apologies if this question has been asked before, but all other threads are so old that it was advised to start a new thread. As the title suggest, i'm having trouble linking files in Code::Blocks(Linux OS). I had the same problems back when i was using Windows. Error message is … | |
I have this Code written but I am having problems with the While loop I need it to recognize if the password has less then 5 characters and if there are spaces. I just cannot get it working for the spaces. Can anyone help?? [CODE]#include <iostream> #include <vector> #include <string> … | |
| |
hi guys , what i am trying to do is ,to take a word as input from user and reverse its order like world into dlrow and tell the user that the word is same or not after reversing its order Here is the code please check it cause it … | |
In the book C Primer Plus, Fifth Edition, in Chapter 10. Arrays and Pointers: C guarantees that, given an array, a pointer to any array element, or to the position after the last element, is a valid pointer. But the effect of incrementing or decrementing a pointer beyond these limits … | |
I am doing a project now in school, and i really need help!. its goes like this: I have 1000 triangles in a file..did it already (its a struct)every triangle has 3 points and its binary catalog number. I have space in memory only for 200. in this file every … | |
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- Please help me... [B]Sir/Ma'am I think I got this one working using this code [U]but I have one problem[/U]: this is the code:[/B] [CODE] #include<stdio.h> #include<conio.h> #include<string.h> #include<stdlib.h> void main() { FILE *fp; char code[80],code2[80], ename[80]; int elevel; clrscr(); if((fp = fopen("samplete.txt","r"))==NULL) { printf("cannot open file.\n"); } printf("Enter … | |
I was given a project in my CSSE class that has to do with signals and handlers. After spending the last 48 hours stressing and cursing the lack of proper information (that I could find) on the Internet to help me understand, I decided to turn here once more. THe … | |
I'm working on a program that's supposed to generate a 40 character random string of uppercase letters A-Z, then generate a random replacement string of random uppercase letters A-Z of length between 2 and 20. It displays the 40 character string, but when I enter the length of the replacement … | |
Hi, just got a question involving the use of MVVM. [BACKGROUND DETAILS] I'm using C#, WPF and MVVM Im using the templates provide in this [URL="http://msdn.microsoft.com/en-us/magazine/dd419663.aspx#id0090102"]MVVM article[/URL] [MY QUESTION] I have created a new View, that displays a textbox with button and on a pressing the button get the value … | |
[CODE]/* this code attempts to generate a sudoku board in an non graphical envoirnment the code compiles fine but however it throws segmentation fault everytime it's run*/ # include<stdio.h> # include<stdlib.h> # include<time.h> static int baseArray[9][9]; static void initialise(); void display(); static int checkPosition(int row, int col, int value); int … | |
Hello, I want to sort array by using" the quicksort algorithm" so here is the code: [CODE] #include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <pthread.h> void *triHoare (void * arg); int PivotSelection (int indexStart, int indexEnd); int Split (int tab[], int pivot, int indexStart, int indexEnd); int MAXTAB; … | |
Hi, Im undergoing a project at the moment and have stumbled onto an error which a could solve nor understand even with google help... So, the C program Im making is suppose to sort an array of surnames into alphabetical order, also the user can use the menu to pick … | |
hey guys, i have to develop a program which will search for files using their names and extension as an option. any idea of how to start or what do i need to know. thanks in advance. | |
My project want to write tokenizer which can able to tokenize input C code (already written C file input to the system) and identify what are the keywords, variables, comments, conditions etc. (all syntax provide by C). any one can help me to do this. | |
Hi, I'm a beginner programmer and I have an assignement of making the radix sort! My plan is to make a helper function that will return the place value of a number. (for example, if the number is 127, then the function will return either a 1, 2 or 7) … | |
Hi everybody plz help me to find a simple code of snake game in c! so tnx | |
Hello. I'm learning C with "The C Programming Language" book, and I'm trying to solve exercise 1.13: "Write a program to print a histogram of the lengths of words in its input. It is easy to draw the histogram with the bars horizontal; a vertical orientation is more challenging." I … | |
Hi started learning c from book "let us c". I noticed that I can't find string unformated functions such as putch,putche or stricmp? Are these funtcion are part of standart? | |
hi there i am trying to build a linked list from read a file operation. this code only adds the first node to the list. the problem is i am facing with "error: request for member 'head' in something not a structure or union" error. i call add_Node function in … | |
[COLOR="Red"][B]//This is the main file[/B][/COLOR] [CODE]#include<iostream> #include<fstream> #include<string> #include "Books.h" #include"account.h" using namespace std; int main() { cout << "\tWelcome\t" <<endl; cout << "1-Login" <<endl; cout << "2-Register" <<endl; cout << "3-exit" <<endl; cout << "Please enter a choice: "; cin >> choice; switch (choice){ case 1: system ("cls"); cout … | |
i want to make a game where different player can join.this is as like a dice game.first time numbers of player can join,after joining the game will start.the game will continue up to 5 or 6 round.after that highest scorer will be declared as a winner, one thing i like … | |
Hello, I am writing a prog with ASP in C#. I have 2 separate pages. on the first page there are 2 textboxes and a button. the first box is a validation check (a code) the second one is the ammount of money you want to withdraw (max of 1000) … | |
I have to ask the user a question on what number they would like to search for in the list. The code compiles fine but when I run it, nothing shows up for the user to ask a question. here is the code: [code]#include<stdio.h> #include<stdlib.h> struct Node { int data; … | |
hi all and thanks for reading. Personally i thought i wouldnt be in the frame of putting up one of my assignments, as i can see where an opinion might be formed, over me trying to pull as fast one and get someone to code this for me etcetc etc..... … | |
Hi all, hope someone can help here, i cant seem to get this to compile. maybe im tired and have not looked at it, but its a bit like blind leading blind etc, meaning not sure what the error is referring to, i have enclosed an attachment image of the … | |
Hi how to access standard input buffer to get 1 and second character from there? for c++ there is a function named peek() but in c libraries I can find one... | |
hi can someone help how to make a program or exampel of program using two dimensional array. Or can someone help me to make program by this problem >Write a program using two dimensional array that searches a number and display the of times it occurs on the list of … | |
Basically i want this function to update the records in the file, but it should first prompt for the name of the employee and then retrieve the employee's details if the name matched any name in the file. Here is my attempt [code] void update(EMPLOYEE *details) /*EMPLOYEE refers to strusture … | |
hello i am try to write a c compiler i have written a lexical analyzer code next is parser can i integrate it with some standard parsers what should be my next step can some one help me through | |
Hi, the following is the code for returning the position of a substring within a string(Brute force algorithm) [CODE] //Brute Force Algorithm #include<stdio.h> #include<string.h> int main(void) { char s1[20],s2[10]; int x1,x2,j,k,i; printf("Enter string 1:"); gets(s1); printf("Enter string 2:"); gets(s2); x1=strlen(s1); x2=strlen(s2); if(x1<x2) return 0; for(i=0;i<=x1-x2;i++) { j=i; k=0; while((s1[j]==s2[k])&&k<x2) { … | |
I need to combine two bits in the same array so that I can display the TCP source and destination. With my code I pull in all the information from the packet and go to work on all of the individual parts. Here is my TCP section [CODE]TCP_source = eth_buffer … | |
I know that the programming style is bad/functions NOT being used are terrible... But I cannot escape my professor's methods... Ok. So this program is meant to read a text file containing: Have a good day then we pick a pick a word, and change it, and output it to … | |
Hey, so im creating a work example for school and right now i'm working on an "address book" sort of. I have three options the user can select add, view, and delete contacts. I want the "view" option to be able to search for first and last names inside of … | |
Hi, I'm working on a simple calculator in Delphi. The assignment is convert C code to Delphi code. My problem is that I've tried for days and I can't come up with something to replace "getchar" from the C code. This is the code in C: [CODE]#include <stdio.h> #include <stdlib.h> … | |
Ok, so my task is to Write a simple TCP client that fetches pages from web servers.The client should be invoked with the command (for example) >> webclient [url]www.yahoo.com/[/url] >> webclient [url]www.msstate.edu/academics/[/url] • The client should get the response from the HTTP server and print it on the screen. Here … | |
ok lets say i have the following text T 2 X F X 2 Y G Y 1 Z Z 2 G 1 I 3 T G E F 2 I E looking at the first line t is the vertex 2 is the number of edges it has and … | |
Has anyone tried to compile the LWIP with a c++ compiler? TCPIP/os/system/lwip/core/memp.c /TCPIP/os/system/lwip/core/pbuf.h:37, from /TCPIP/os/system/lwip/core/memp_std.h:1, from /TCPIP/os/system/lwip/core/memp.h:45, from /TCPIP/os/system/lwip/core/memp.c:43: /TCPIP/os/system/lwip/core/err.h:41: error: expected identifier before ‘extern’ /TCPIP/os/system/lwip/core/err.h:41: error: expected `}' before ‘extern’ The compilter (g++) serachs the } from enum in the include files. Has anyone a idea what i must … | |
Hi, I wrote a program for detecting circles using Hough Transform using OpenCV in C. The program inputs 3 images, each image contains a fixed small circle and a big circle with variable position. The program then recognizes both the circles and marks the centres of both the circles. Now … | |
So I'm trying to code a program where it produces a directory listing of all files matching a specified file name pattern. I have compiled a code that is somewhat similar (But still functions differently) than the code I want; my code just lists the directory with full parameters. How … | |
I have the following code in some source I am looking at but I have never seen it before. Can someone tell me what it means? The code snippet is below: [CODE] [B]#define SET_EXPIRE(sa, delta, exp){[/B] [B]if[/B](((sa)->ipsa_ [B]## delta) != 0){[/B] (sa)->ipsa_ [B]## exp = sadb_add_time((sa)->ipsa_addtime,[/B] (sa)->ipsa_ [B]## delta);[/B] [/CODE] … | |
I am doing a personal project to get to know C a little better: Some essential information - I have a usb printer - I am using Windows 7 OS..suggest better Os..haha..not NT or ms-dos ;) - I am using Visual C++ 2008 Express edition..coding strictly in C however(You can … | |
hello iam using visual studio 2005 i want to build website with c# not apllication but tutorials show that they have been built only in vb can some one show me links to build websites through c# | |
Hello, I have spent numerous hours re-working this code and I hope someone can clear up my confusion! This program asks the user to enter a file name which will then create and display that file with a poem in all caps. The user is again prompted to enter another … | |
Ok, I'm using gcc in ubuntu to compile. Below is a boggle solver that basically loads a dictionary.txt file and then you would input a 5x5 grid of letters like below into the letter[][] array a b c d e f g h i j k l m n o … | |
hi all , can i access the parallel port using c`s assembly language syntax and using windows 98 se as the os or xp if i could (dont think xp is possible though, i dunno?) AOAP Thanks for reading , gruffy bw , if is possible can i get direction … | |
i have a few .c files, pro3.c is the only file that complies without a problem however when i go to compile the other ones i get a error message: warning useless storage class specifier in empty declaration, i was hoping someone could tell/show me what i am doing wrong. … | |
Hello, world! This is my first post on DaniWeb, though I have frequented it quite often. I'm using gcc and make (on Ubuntu 10.10) with GVim for creating a foundation library in C. Within my code I've built in rudimentary profiling and assertion policies that are enabled through a symbolic … |
The End.