19,876 Topics

Member Avatar for
Member Avatar for CelticWhisper

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 …

0
157
Member Avatar for rEhSi_123

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(); …

Member Avatar for rEhSi_123
0
85
Member Avatar for Anark10n

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 …

Member Avatar for Anark10n
0
2K
Member Avatar for jswain323058

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> …

Member Avatar for jswain323058
0
91
Member Avatar for gayansameera
Member Avatar for saqib

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 …

Member Avatar for arjunpk
0
208
Member Avatar for Markmit

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 …

Member Avatar for yashsaxena
0
889
Member Avatar for dashure

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 …

Member Avatar for TrustyTony
0
151
Member Avatar for madmhan84

-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- 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 …

Member Avatar for WaltP
0
229
Member Avatar for NickJoe

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 …

Member Avatar for NickJoe
0
295
Member Avatar for wdearth

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 …

Member Avatar for arjunpk
0
164
Member Avatar for CrazyProgrammer

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 …

Member Avatar for CrazyProgrammer
0
223
Member Avatar for zaraki

[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 …

Member Avatar for zaraki
0
197
Member Avatar for fifouta

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; …

Member Avatar for abhimanipal
0
174
Member Avatar for drongo

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 …

Member Avatar for drongo
0
150
Member Avatar for darkdai

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.

Member Avatar for WaltP
0
96
Member Avatar for gayansameera

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.

Member Avatar for gayansameera
0
193
Member Avatar for narunaru

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) …

0
60
Member Avatar for shima.khanehzar
Member Avatar for kayhantolga
-1
85
Member Avatar for ak24

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 …

Member Avatar for ak24
1
375
Member Avatar for cppgangster

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?

Member Avatar for abhimanipal
0
128
Member Avatar for quartaela

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 …

Member Avatar for abhimanipal
0
444
Member Avatar for cestra

[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 …

Member Avatar for cestra
0
206
Member Avatar for moshiurbest

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 …

Member Avatar for kiranroy
0
87
Member Avatar for Robert955

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) …

Member Avatar for Robert955
0
236
Member Avatar for javarook

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; …

Member Avatar for Ancient Dragon
0
172
Member Avatar for gruffy321

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..... …

Member Avatar for WaltP
0
224
Member Avatar for gruffy321

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 …

Member Avatar for gruffy321
0
162
Member Avatar for cppgangster

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...

Member Avatar for Ancient Dragon
0
152
Member Avatar for iorisendoh

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 …

Member Avatar for gruffy321
-2
317
Member Avatar for ira2010

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 …

Member Avatar for myk45
0
99
Member Avatar for qasimhasnain

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

Member Avatar for L7Sqr
0
156
Member Avatar for gaurav_13191

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) { …

Member Avatar for koberoc
0
152
Member Avatar for Protoroll

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 …

Member Avatar for L7Sqr
0
129
Member Avatar for Abhishek Joshi

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 …

Member Avatar for L7Sqr
0
108
Member Avatar for Khoanyneosr

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 …

Member Avatar for Khoanyneosr
0
146
Member Avatar for Pundia

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> …

Member Avatar for Battlesnake
0
599
Member Avatar for asa88

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 …

Member Avatar for nezachem
0
725
Member Avatar for israruval007

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 …

Member Avatar for israruval007
0
2K
Member Avatar for xeniter

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 …

0
56
Member Avatar for silentassasin

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 …

0
188
Member Avatar for yongj

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 …

Member Avatar for Ancient Dragon
0
159
Member Avatar for tkdlady

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] …

Member Avatar for tkdlady
0
174
Member Avatar for CoilFyzx

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 …

Member Avatar for Ancient Dragon
0
615
Member Avatar for rithish

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#

Member Avatar for RunTimeError
0
168
Member Avatar for aprilchica3

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 …

Member Avatar for aprilchica3
0
178
Member Avatar for charchar88

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 …

Member Avatar for WaltP
0
149
Member Avatar for gruffy321

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 …

Member Avatar for gruffy321
0
512
Member Avatar for jrp370

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. …

Member Avatar for Narue
0
505
Member Avatar for _avishek

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 …

Member Avatar for _avishek
0
595

The End.