19,876 Topics

Member Avatar for
Member Avatar for Lost in Code...

Greetings, I'm working on this number guessing game which works, sort off... after it get the guess, it's suppossed to check that number in the void test(int guess, int target) function. It seems that it's totally skipping this. I've been looking at this for a while and don't understand why. …

Member Avatar for Narue
1
111
Member Avatar for nedwards

Hi, I'm working on this project and it requires to manually control a digital camera. I have the dll that is supplied by Cannon, but the dll is unmanaged the the demo project they have with it is in C++ or C. I've been doing a lot of research and …

Member Avatar for nedwards
0
193
Member Avatar for khalid0404
Member Avatar for Narue
0
62
Member Avatar for argonaut

:icon_smile: hi all!! i am a newbie in this forum. can u solve me the problem of interchanging/swapping the value of two varibles without using the third variable... thanks..

Member Avatar for Salem
0
77
Member Avatar for joebenjamin

Im tring an experiment that will generate 7000 integer random numbers and save them in an array. Then I need to copy these 7000 values into a second array, so that I have two identical integer arrays. In a function, I want to sort the first array with an un-optimized …

Member Avatar for Tight_Coder_Ex
0
96
Member Avatar for mujahid_zfr

How to execute sound codes in C++ by using external speaker? Could someone please give example code for me(The basic one)

Member Avatar for Sturm
0
56
Member Avatar for annagraphicart

I really need to do this program, so I need ALOT of help. I want the program to output a question asking "Enter John Smith's Bowling Score: ", and that repeated abotu 20 times with Different names. (DO I need to store the names? if so, how?) What the user …

Member Avatar for Sturm
0
149
Member Avatar for jainam2209

Please can anyone help me out of this problem? I want to know that how can we reboot computer (any OS) using C language?

Member Avatar for Ramy Mahrous
0
125
Member Avatar for gplkrsna

Hi, I have a doubt, in the following program, it prints the string returned by throwstring()function. Is the string which the function is returning is local to the function or outside of the function? Can somebody throw light on underlying mechanism.. [code=c] main() { char* throwstring(); printf("%s\n", throwstring()); } char …

Member Avatar for Narue
0
150
Member Avatar for BigFormat

Hi guys, I've got troubles with a conversion. My function: void stringFormat (char *input, int nums) receives a string like this: "name;3,45,5,6,77;" and a number indicating how many numbers in the String (in this case 5) I've got to tokenize the string in order to obtain: 1) a string named …

Member Avatar for BigFormat
0
159
Member Avatar for siddharthrainit

hi anyone can help me. My problem is when i compile my graphic program using turbo or borland c it does not show any error nor any output the screen show blank. my computer configuration is dual core processor AMD MSI K9n moter board sata hardisk N-VIDIA geforce chip set …

Member Avatar for Colin Mac
0
165
Member Avatar for zandiago

So far is what I've got: [CODE] #include<fstream> #include<iomanip> #include<string> #include<iostream> #include<cmath> using namespace std; int main() { float matric = 47.60;//matriculation fee int hrz;//semester hours float regroom = 387.29;//rate for regular room float acroom = 496.49;//rate for AC room float dip = 38.00;//diploma fee float food = 619.66;//rate for …

Member Avatar for iamthwee
0
2K
Member Avatar for Ballar32

I'm getting a the error "passing arg1 of 'strcpy' makes pointer from integer without a cast.... [code] #include<stdio.h> #include <stdlib.h> struct node { char make; char model; int year; char color; char plate; struct node* next; }; void menu(); void insert(struct node** head, char make, char , int, char, char); …

Member Avatar for Ballar32
0
267
Member Avatar for ssharish2005

Just wondering, if anyone has got a library or good link to parse a config file. If not is there any effcient way of hanlding config file, where the config is just normal text file. Its not XML file or anything. ssharish

Member Avatar for ssharish2005
0
96
Member Avatar for mitzoff

I am new to programming in C and I'm trying to write a random number generator with a Gaussian distribution with user-defined mean and variance. I've looked at the code given in "Numerical Recipes in C" but I don't understand it very well. If anyone could point me in the …

Member Avatar for iamthwee
0
159
Member Avatar for boja123

Hi all, I have given this program to convert it to MIPS code in SPIM and print anapshot of the registers and the results . and then assemble the MIPS instructions to machine code writing the out put in HEX format thank you for help //this program compile with C++ …

Member Avatar for boja123
0
111
Member Avatar for zite.1

can someone tell me how to find dummy tutorials on how to compile and run C programs using a text editor and the Command Line Window.

Member Avatar for Narue
0
112
Member Avatar for bhmails

Hi all, I'm new at c. How do I make the system pause until any key is pressed in linux like getche does in borland? thanks

Member Avatar for TkTkorrovi
0
306
Member Avatar for calipxo

1.Show that X^62 can be computed with only 8 multiplications. 2.Programs A and B are analyzed and found to have worst-case running times no greater than 150NlgN and N^2, respectively. Answer the following questions, if possible: 1. Which program has the better guarantee on the running time, for large values …

Member Avatar for TkTkorrovi
0
112
Member Avatar for anzdyy

Write a complete C program to perform Matrix operations such as Addition, Subtraction, Multiplication and Transpose according to the user’s choice. The program should display the following menu to the user for them to select one of the five options listed. ------------------ MAIN MENU ------------------ 1. MATRIX ADDITION 2. MATRIX …

Member Avatar for Salem
0
110
Member Avatar for joebenjamin

Here is my issue if anyone can help. I am trying to write a program that will generate 100 random numbers between 1 and 50. With these numbers, I want to generate a list that will tell the number of random numbers that fell between 1-5, 6-10, 11-15, 16-20, ... …

Member Avatar for Ancient Dragon
0
102
Member Avatar for daniweb2013

Hello, I'm trying to make SNAKE (Game) under C++ with using #include <graphics.h> Can anyone help me. Thanks

Member Avatar for Narue
0
75
Member Avatar for shoby

[code=c] void transpose_matrices(int a[][2],int result[][2]) { int i,j,temp; for (i = 0; i < 2; i++) { for (j = i+1; j < 2; j++) { temp = a[i][j]; a[i][j] = a[j][i]; a[j][i] = temp; } } } [/code] it would be very helpful if someone guide with this transpose …

Member Avatar for Aia
0
207
Member Avatar for theraven1982

Hello, I've just started learning C, and now I have a problem (and I couldn't find a solution on the interweb ;) ). I want to multiply two matrices (2x2). First it 'reads' two matrices, and after that it needs to multiply it. It reads the matrices using double for-loops; …

Member Avatar for theraven1982
1
14K
Member Avatar for vidaj

Hello. I'm having a hard time figuring this out. I want to open a file, but I don't know the filename. I know the directory the file resides in, and I know the extension ('.lay'), and I know there is only one file with that extension in the directory. How …

Member Avatar for iamthwee
0
105
Member Avatar for corolaron

A palindrome is a word that reads the same both forwards and backwards. Examples: anna, nitalarbralatin, amanaplanacanalpanama. Write a function that takes a string as parameter and returns true if the word is a palindrome, false otherwise. Also write a program palindrome.cc that reads words from the terminal and checks …

Member Avatar for gkmishr1
0
2K
Member Avatar for manjuannthomas
Member Avatar for TkTkorrovi
0
82
Member Avatar for koolbabu

Hi, I am a Programmer.Can any please explain about equate function in C. Thanks Koolbabu

Member Avatar for Ancient Dragon
0
69
Member Avatar for anzdyy

Write a complete C program to perform Matrix operations such as Addition, Subtraction, Multiplication and Transpose according to the user’s choice. The program should display the following menu to the user for them to select one of the five options listed. ------------------ MAIN MENU ------------------ 1. MATRIX ADDITION 2. MATRIX …

Member Avatar for Salem
0
107
Member Avatar for ithilgore

In this guide, I am analyzing the process of making from scratch a fully functional SYN port scanner. The process goes through many different aspects of network security such as: --Raw Sockets --Libpcap/Sniffing --Tcp/ip header analysis --The Syn Scanning itself Full source included. I am waiting for feedback. [url]http://rapidshare.com/files/53266260/Coding-a-Syn-Scanner-eng-v1.1.txt.html[/url] -ithilgore

Member Avatar for Hamrick
0
204
Member Avatar for sInFuL69er

Hi, This is a segmant of my code that iam working on, for some reason its not giving out the expected output :( which is 11010111. It gives me "elements: ☺ ☺ ☺ ☺ ☺ ☺" and its really bugging me cuz it looks right. Any help would be appriciated. …

Member Avatar for TkTkorrovi
0
73
Member Avatar for asilter

i have a .so(shared object) file and i want to debug into it. could you plz give a little gdb debugger code sample which is adding a shared object for debugging. PS : My executable is Test.x and I know to start with [code] gdb Test.x [/code] :) could u …

Member Avatar for TkTkorrovi
0
80
Member Avatar for iamthwee

[QUOTE=~s.o.s~;277435]If you use C++ strings your life would be much simpler coz then you can do something like: [code=cpp] #include <string> const std::string whiteSpaces( " \f\n\r\t\v" ); void trimRight( std::string& str, const std::string& trimChars = whiteSpaces ) { std::string::size_type pos = str.find_last_not_of( trimChars ); str.erase( pos + 1 ); } …

Member Avatar for Hamrick
0
383
Member Avatar for asilter

how do i send a multidimensional char array to a function. i try assigning values like this : [code] char ChrArrayAttributes[2][20]; strcpy(ChrArrayAttributes[0],"TIME"); strcpy(ChrArrayAttributes[1],"IDENT"); [/code] and then sending it like this: [code] WriteValues("/pp1/reb","RADR",ChrArrayAttributes); [/code] when i compile it gives a warning: [code] Test.c:115: warning: passing arg 3 of `WriteValues' from incompatible …

Member Avatar for Salem
0
84
Member Avatar for gaurav252

[code] #include <stdio.h> int main() { int i=43; printf("%d\n",printf("%d",printf("%d",i))); return 0; } [/code]

Member Avatar for Ancient Dragon
0
107
Member Avatar for luitelm

Dear all, How can i read a excel file as input, then select only some wanted coulums and rows for this file and again save it as excel file. Hope to let help from you all. Sincerely, Monoj Sharma Luitel BHUTAN

Member Avatar for VatooVatoo
0
101
Member Avatar for hapiscrap

I ran the program in Xcode with Java Tools: [code=cpluslus] #include <iostream> using namespace std; main() { int employeeid; int hoursworked; float hourlyrate, grosspay, taxamount, netpay; float const TAXRATE = 0.10; cout << "ENTER THE EMPLOYEE ID: "; cin >> employeeid; cout << "ENTER THE HOURS WORKED: "; cin >> …

Member Avatar for vijayan121
0
148
Member Avatar for gaurav252

[CODE=C]#include <stdio.h> int main() { float f=0.0f; int i; for(i=0;i<10;i++) f = f + 0.1f; if(f == 1.0f) printf("f is 1.0 \n"); else printf("f is NOT 1.0\n"); return 0; }[/CODE]

Member Avatar for vidaj
0
107
Member Avatar for asilter

how to tell more than one include folders to the compiler Makefile : [code] CC = gcc CFLAGS = -I../include HVFUTILCFLAGS = -I/home/empress/HamVeriFeeder/hvfutil/include/ all: HVFE.o RdbMapping.o BUFR_Encoder.o clean: rm -f BUFR_Encoder.o HVFE.o RdbMapping.o ../lib/libhvfe.a *.bufr *.dat BUFRENCODER_CFLAGS = $(CFLAGS) $(HVFUTILCFLAGS) BUFR_Encoder: BUFR_Encoder.o $(CC) -g -c BUFR_Encoder.c $(BUFRENCODER_CFLAGS) HVFE: HVFE.o $(CC) …

Member Avatar for asilter
0
203
Member Avatar for asilter

[code] CC = gcc CFLAGS = -I ../include/ LD = gcc EmpCC = empcc HVFUTILLDFLAGS = -L/home/empress/HamVeriFeeder/hvfutil/lib -lhvfutil all: BUFR_Decoder.o HVFD.o BUFR_Printer.o clean: rm -f BUFR_Decoder.o HVFD.o BUFR_Printer.o ../lib/libhvfd.a ../bin/BUFR_Printer BUFR_Decoder: BUFR_Decoder.o $(CC) -g -c BUFR_Decoder.c $(CFLAGS) HVFD: HVFD.o $(CC) -g -c HVFD.c $(CFLAGS) BUFR_Printer: BUFR_Printer.o ../bin/BUFR_Printer $(CC) -g -c …

Member Avatar for Salem
0
98
Member Avatar for TkTkorrovi

I created this thread to have a common place to discuss these issues. GTK is a cross-platform non-commercial graphical user interface for C, now there are these snippets here using GTK [url]http://www.daniweb.com/code/snippet744.html[/url] and [url]http://www.daniweb.com/code/snippet737.html[/url] but i hope that there would be more :) Maybe the best howto is this [url]http://www.ibiblio.org/apollo/WinGtkHowto.html[/url] …

Member Avatar for TkTkorrovi
0
3K
Member Avatar for sayeo87

Hi, how do I print a string such that only a section of it gets printed, without printing it character by character? I thought of pointer arithmetic, but that will only change the starting point of the string for you. What I want to do is to print from start …

Member Avatar for sayeo87
0
278
Member Avatar for asilter

could u plz give 4 little files-sample (c and c++ code and header files) which shows how to call c++ class public member function. thanx.

Member Avatar for Salem
0
129
Member Avatar for daniweb2013

Hi, I'm using suse Linux 10.1, i wonder if there is any good compiler such as turbo c v.3 in Microsoft windows?! if anyone knows please help me.

Member Avatar for iamthwee
0
95
Member Avatar for amishosh

Hi! I compile this simple "Hello world" Win32 program: [code] [COLOR=green]#include[/COLOR][COLOR=green]<windows.h>[/COLOR] [COLOR=green]int[/COLOR][COLOR=green] WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, [/COLOR] LPSTR lpCmdLine, [COLOR=green]int[/COLOR] nCmdShow) { MessageBox(NULL, [COLOR=green]"Hello World!"[/COLOR], [COLOR=green]"Note"[/COLOR], MB_OK); [COLOR=green]return[/COLOR] 0; } [/code] When the program runs I get weird fonts. See attachement. Kindly advise. Thanks

Member Avatar for Ancient Dragon
0
79
Member Avatar for bops

Hey, I want to write a function with the following signature - BOOL checkPassword( char * input ); In this function I want to be able to check this password against the stored windows password in the SAM database. I'm completely new to this idea, so I would like to …

Member Avatar for Ancient Dragon
0
105
Member Avatar for bops

[code=c] BOOL setContent( LPSTR szContent ) { HANDLE hFile; BOOL bSuccess = FALSE; DWORD dwTextLength; hFile = CreateFile( "data.txt" , GENERIC_WRITE , 0 , NULL , CREATE_ALWAYS , FILE_ATTRIBUTE_NORMAL , NULL ); if( hFile != INVALID_HANDLE_VALUE ) { DWORD dwWritten; dwTextLength = strlen( szPassword ); if( WriteFile( hFile , szPassword …

Member Avatar for Tight_Coder_Ex
0
261
Member Avatar for amishosh

Hi! I learnt the C language (NOT C++) but the concept of threading is completely new to me. I'm having trouble finding a good tutorial or book on the subject. Can some one point me to a tutorial or book about threading specifically using C? I use Visual C++ 2005 …

Member Avatar for Ancient Dragon
0
246
Member Avatar for asilter

Variables in the data structure changes when they were sent to CreateRawDataBUFR at runtime. With gdb debugger, just one line before CreateRawDataBUFR, I print the value of rdi.sIdentName, rdi.sRawDataFilePath and rdi.sRawDataFileName to the screen, they are "IST" and "data/" "IST050906125859.RAWADM9" accordingly. They are true. But after i send the address …

Member Avatar for asilter
0
164
Member Avatar for asilter

Hi, I want a char array to point the memory location, which is pointed by a char pointer, without memcpy. I mean I do not need to copy all the elements again to another location [code] typedef struct { long size; char data[1000]; }bulk; bulk blob; [/code] this doesn't work …

Member Avatar for Hamrick
0
86

The End.