19,876 Topics

Member Avatar for
Member Avatar for suley04

Yesterday I created a thread called "File Handling Problems!!"..... today within the first half an hour I have moved forward a bit (which is a relief)..... but I still have a problem..... [CODE] 1.#include <stdio.h> 2.#include <string.h> 3. 4.int main() 5.{ 6. int week = 0; 7. int units = …

Member Avatar for suley04
0
102
Member Avatar for babi

I need to use an array of chars to input chars from the console but I don't know how many chars will be actually inputed. How can I have an array of chars whithout knowing its size in advance? I could put the array with a very high size but …

Member Avatar for Freaky_Chris
0
590
Member Avatar for tomtetlaw

Hi all, I am making a text game in c++ and i am trying to get the player's attack to ba a random number between 1 and 7, but when i try to compile it, it gives me this error: 49 C:\Documents and Settings\Games\Desktop\C++ Tutorial\Combat\main.cpp void value not ignored as …

Member Avatar for Narue
0
323
Member Avatar for arnaudrizzo

hello, i'm seeking for an implementation of singular value decomposition whith power methode to get severals eigen value of a big sparse matrix in C. thank you.

Member Avatar for Narue
0
43
Member Avatar for danibootstrap

Hi,I want to try out speech recognition with my robot.Like I say move and the robot moves forward.I want to do this in C (DevCpp)? Windows XP.I have used Open CV for Image Processing.Is there a speech recognition SDK like the Open CV?Please guide me.

Member Avatar for danibootstrap
0
85
Member Avatar for Ragupathiyuva

Hi Can anybody tell me What is the usage of Static functions and where we can use what is the advantage of Static functions over Normal functions Advance Thanks for helping

Member Avatar for Ragupathiyuva
0
104
Member Avatar for akmed

I am doing C++ assignment, it invols designing a program where the user can put binary numbers and gets a word in result. I have done the first part of the program but i am strugling to do the the last to tasks. Here is what i have done so …

Member Avatar for AHUazhu
0
127
Member Avatar for cusado

when i try to do the following, [code] double root_value, c; int d; d=0; printf("%.0f", root_value); for(c=2; c<root_value;c++) { if(c !=root_value) { if(fmod(root_value,c)==0) { d = 1; } } } if(d == 1) { printf("not prime\n"); } else printf("is prime\n"); [/code] now its part of a program to determine if …

Member Avatar for ArkM
0
120
Member Avatar for CoolAtt

plz explain how to do this the proper way. [CODE]main.c ===== struct names{ // definitions ----- ---- ---- } struct names x; function1(&x); file2.c ====== function1(struct names *x){ ---- ---- ---- }[/CODE] am getting warning: [B]'struct names' declared inside parameter list[/B]

Member Avatar for ArkM
0
135
Member Avatar for cusado

im trying to right align data that i have written to file with fprintf, but im not sure how i would do so in C. ive looked around and there are many solutions for C++ and C# but havent found one for to right align in regular C.

Member Avatar for Narue
0
253
Member Avatar for brianlesays

All right, so I have a final exam due that consists of four problems. I'm currently working on the first problem. I understand the algorithm of the problems, but I am very, VERY weak with syntax and the entire C language in general. In the first problem, I just indexed …

Member Avatar for verruckt24
0
124
Member Avatar for the reaper

anyone know how to add your program to start up on windows xp/vista and regardless of user admin guest or normal user...any bit of source code available will be helpful..

Member Avatar for jbennet
0
315
Member Avatar for CoolAtt

hi. actually i hv to read lines from a file which is getting updated at the same time( new lines are appended at the end of the file). plz suggest a way to implement it in c. thx.

Member Avatar for Murtan
0
153
Member Avatar for micky692002

Hi guys, I have to make a program for my programming class and I have no idea of how to do it. Can someone help me? Here's the program that I have to make in C++. A common memory matching game played by children is to start with a deck …

Member Avatar for Murtan
0
3K
Member Avatar for antonis233

hi im try to do a program to put binary number like this 1 0 0 0 and after display in this way 0001

Member Avatar for Freaky_Chris
0
49
Member Avatar for Undermine

[B]header[/B] [ICODE] class DeckOfCards { public: DeckOfCards(); void Shuffle(); void deal(); void hand(); private: int deck[4][13]; int numcard; int row; int col; }; [/ICODE] [B]main[/B] [ICODE] #include "dc.h" using namespace std; int main() { DeckOfCards DeckCards; DeckCards.Shuffle(); DeckCards.deal(); DeckCards.hand(); return 0; } [/ICODE] [ICODE]#include <iostream> using std::cout; using std::cin; using …

Member Avatar for mrboolf
0
110
Member Avatar for elitedragoon

This is the problem, when I run it, there are no errors. However when I check the reportfile, I end up with the wrong numbers from the calculations. The calculator: [CODE]void AddDetailToAccumulators(float *totfedtax, float *totssitax, float *totstatetax,float *totrate, float *totreg, float *totovt, float *totgross,float *totpay,float *totdeferred, float gross, float federaltax, …

Member Avatar for Luckychap
0
147
Member Avatar for Whilliam

This is a cursor-based implementation of list inserting at the end. In the program below, the output the program will show me is the last element of my input. It is suppose to show all elements from the first input to the last. Also, after two inputs, when inserting, it …

Member Avatar for Whilliam
0
232
Member Avatar for BigFormat

I need to list the files in my current directory and have them packed into an array of chars, in Linux. I use system("ls > temp_file"); to write them one per row in a temp file, and then I copy from this file to my string. Is there a more …

Member Avatar for Salem
0
66
Member Avatar for tarunguptacs

How could i establish a wifi connection between PDA and desktop using C,Windows SDK??

Member Avatar for Jawahar prabhu
0
45
Member Avatar for keyser_soze

hey...i want to understand how following code works : [code=c]int x=1; printf("%d%d%d",x,++x,x); [/code] [code]OUTPUT: 222[/code] also [code=c]int x=1; printf("%d%d%d",x,++x,x++); [/code] [code]OUTPUT: 221[/code] actually these o/p are produced when i use [B]visual c++[/B] compiler but when i wrote the same commands in [B]turbo c[/B] they gave perfectly understandable o/p as [B]221[/B] …

Member Avatar for keyser_soze
0
150
Member Avatar for GrahamShaw2008

Where do I locate the logical or on my keyboard? Thanks for your help in advance.

Member Avatar for GrahamShaw2008
0
2K
Member Avatar for sandiego_f

Hi Guys, i am pretty new into C. I read a book and made some examples. So all this is just precedural programming. Nothing special. I want to read all the Hardwareinformation i can out of my system. (Windows XP System). I can already read via Registry, CPUID and SYSTEM_INFO …

Member Avatar for low_coder
0
100
Member Avatar for dharma30

Hello Everyone!, This Forum has helped me very much in understanding different solutions in C-language . Before I post my query i would like to thank everyone for there help in the past. Q: I have a text file say "input.txt" which contains a table in the following form NAME …

Member Avatar for low_coder
0
2K
Member Avatar for serkan sendur
Member Avatar for jbennet
0
62
Member Avatar for Demonisya

O.k My teacher game me a take home exam which will be submitted on monday..... and also I have to defend what I composed so I will ask you many questions so that I will understand this program..... my teacher said Never use C... do it in your own ideas.... …

Member Avatar for Demonisya
0
107
Member Avatar for srikanth.sonu

Hi all, I have a code to read the records using a file,also the file has got unnecessary stuff that needs to be ignored. I am able to read and write only the first record,next am able to read and write only the second "record name" but not the whole …

Member Avatar for Murtan
0
79
Member Avatar for didi00

hello,can someone help me? I must make a program which contains: Deck (the data in it must be integer(numbers)),(if possible,in header file). Sort the elements by the method of Shell Find the elements that can be divided by 5, and smaller then the largest number that can be divided by …

Member Avatar for didi00
0
153
Member Avatar for andyT

Hello, I'm trying to find some help with code that I've been maintaining and currently trying to modify. Basically, I am working with a single array of length "m", call it the "max" array. Other than knowing that each entry in the "max" array is nonnegative, I have no other …

Member Avatar for andyT
0
117
Member Avatar for cbreeze

I have to build a card game war in a C++ card game. The program must randomize a set of cards for both the user and a computer player. the cards are 2-14 for one array then a parrallel array for suit 0-3. then organize each hand in descending order …

Member Avatar for Freaky_Chris
0
2K
Member Avatar for CoolAtt

hi all. the following is working fine for me char * hex = (..dynamically allocated memory with malloc..); *(hex+0) = 0x43; *(hex+1) = 0x2b; i now have to assign a string in the format 43 2b 1c to the char * array at runtime. anyone did it ? plz guide.

Member Avatar for Murtan
0
1K
Member Avatar for spool

Hay guys, I was looking at a few examples of how a Radix sort works, and writing up a document explaining it. I based my findings on one particular example I found, link follows. [URL="http://www.cubic.org/docs/radix.htm"]http://www.cubic.org/docs/radix.htm[/URL] Well the bit shifting here is giving my head a bit of a spin, and …

Member Avatar for rezzy1
0
811
Member Avatar for redrum237

hi. i am looking to run the following queries from the project zipped with this message: 1. List all lecturers in alphabetic order by surname within a selected department. 2. List all lecturers within a selected faculty. 3. List all modules taught by a selected lecturer. i am having trouble …

Member Avatar for redrum237
0
63
Member Avatar for Elsammos

Hello everybody, first of all, I'm quite new to programming in C, so forgive my ignorance. For an assignment i have to program a microcontroller (Atmega8) using ICCAVR. I'm working on a programme similar to 'simon says' (where 4 led's are illuminated in a random order, and afterwards you have …

Member Avatar for Elsammos
0
97
Member Avatar for CPPNOOB

Hey i need help with the final assignment of my Microsoft Visual C++ class and its a hard one its an online address book where it keeps a bunch of information such as name id birthday and etc. i know it looks messy but if you copy paste into the …

0
57
Member Avatar for nashmage

What im trying to do is use shared memory and increment a value in it so that i can test to see how many times i get the actual number i was looking for which is 4000000 or more/less. Im using 2 forks so that i have 2 child processes …

Member Avatar for Salem
0
119
Member Avatar for atman

Hello guys, I'm trying to collect user input which combines integers with letters, but whenever it reaches the scanf for char it skips it and goes to next integer, could anybody explain why??? is it because main returns an integer,? I tried setting void main(void), and it sais that main …

Member Avatar for WaltP
0
153
Member Avatar for Yilon

First, let me introduce myself. I was a pretty good C programmer, back when [and very modest as well.] I got into other lines of work and have been out of programming for several years. The other lines of work have ... you have read the headlines, right? I need …

Member Avatar for Ancient Dragon
0
170
Member Avatar for coolbuddy059

Now-a-days I'm deeply interested in topics like hcking and virus.Can u suggest a link where I can create my own virus. Please help me

Member Avatar for boB_K7IQ
-3
127
Member Avatar for botter911

Hi, I have a problem here in the selection search because it reads the text but does not detect the position of the text like a is in the 2 position. the is in the 1 positon.... like that. But If I do this for characters it detects it. Any …

Member Avatar for Ancient Dragon
0
119
Member Avatar for sept567

Hello, I am working on a Tic-Tac-Toe program in C++ which I want to have AI that will either win or draw every time, but will never lose. I think that this is within my grasp, though I am not at all an expert programmer. I would really appreciate if …

Member Avatar for sept567
0
174
Member Avatar for sumitk538

can anyone give me the program in turbo C++ for the conversion of decimal numbers to hexadecimal numbers, octal numbers to decimal numbers. it will be so kind of you. thanx.

Member Avatar for Freaky_Chris
0
75
Member Avatar for RaDeuX

Okay, so my program is very close to completion. The only problem is that the program leaks memory. The deleteNode, deleteManager, and destroyList are the ones to blame, or so I think. When I delete a node other than the first one it works while leaking memory. However, when I …

Member Avatar for Salem
0
174
Member Avatar for Vallnerik25

I have a few questions about c strings, string literals, c++ string objects and how pointers and constantness all come together. I am wondering why a c string can be set like this but can't be changed dynamically with an assignment operator like this. [CODE] char str [] = "string1"; …

Member Avatar for Vallnerik25
0
189
Member Avatar for supersabre

I am trying to create multiple trees after calling tree_holder. The number of tree is unknown until compile time. Since there are many trees, and i want to access them right away just like an array. I do not use linked list since it is too slow. I have written …

Member Avatar for supersabre
0
305
Member Avatar for Erikmmp

Hi everyone, I am trying to make a program that times how long it runs for in seconds or milliseconds or whatever. The unit of time doesn't matter, I just need to know if C has any function I could use to do this. So, just as an example, I'm …

Member Avatar for Erikmmp
0
127
Member Avatar for aamresh1

What sort of number does gmp.h generate - Binary or Decimal? Please need the answer a bit quickly. Thanks, Amresh.

Member Avatar for ArkM
0
89
Member Avatar for himanjim

Hi, I' studying various sorting techniques...And one thing I'm not clear about the complexity of the techniques... For e.g the complexity of bubble sort is Average Case=>O(n*n) Worst Case=>O(n*n) Best Case=>O(n*n) Obviously n is the no. of elements in the array... But even in the worst case i.e the array …

Member Avatar for Freaky_Chris
0
153
Member Avatar for xlx16

hello again i have three questions again: how can i use malloc or calloc for a two demontional arrays? is it true that A. calloc allocates memory in contiguous bytes, malloc does not ensure contiguous memory allocation? the third question which is a bit irrelevent to programming how memorey locations …

Member Avatar for Salem
0
372
Member Avatar for sambafriends

Hi, any body guide me a program how to convert octal to hexa decimal number using c lnaguage without using %x %o regrards, samba

Member Avatar for Demonisya
0
71

The End.