19,876 Topics

Member Avatar for
Member Avatar for kimw

can anyone offer performance tips to improve the running time ? this function opens a file (a 7000 row by 30 col), and stores each elements in a matrix data . current running time is 4 sec, and i desperately need to minimize the running time as i need to …

Member Avatar for kimw
0
92
Member Avatar for theUnNown1

Can someone tell me how I can draw a diagonal or slanted oval on my form? I know DrawEllipse draws circles that are either straight vertical or straight horizontal....

Member Avatar for iamthwee
0
138
Member Avatar for Line

Helloes! I'm using getrusage to get the usertime and systemtime, but sometimes the times returned are negative --> SELF: user time: 1313366639 microseconds system time: -1547562616 microseconds I'm not sure I've understood getrusage correctly, so I'm posting my code in hope of getting a few tips on how to avoid …

Member Avatar for Line
0
202
Member Avatar for rowly

can any one help with this function how it works ! thanks u [code] [COLOR=#0000ff]int[/COLOR][COLOR=#000000] compare([/COLOR][COLOR=#0000ff]const[/COLOR][COLOR=#000000] [/COLOR][COLOR=#0000ff]void[/COLOR][COLOR=#000000] *a,[/COLOR][COLOR=#0000ff]const[/COLOR][COLOR=#000000] [/COLOR][COLOR=#0000ff]void[/COLOR][COLOR=#000000] *b)[/COLOR] { data i= *(data *)a;[COLOR=#008000] [/COLOR]data j= *(data *)b; [COLOR=#0000ff]if[/COLOR] (i.Mark==j.Mark) [COLOR=#0000ff]return[/COLOR] 0; [COLOR=#0000ff]if[/COLOR] (i.Mark<j.Mark) [COLOR=#0000ff]return[/COLOR] -1; [COLOR=#0000ff]if[/COLOR] (i.Mark>j.Mark) [COLOR=#0000ff]return[/COLOR] +1; } [/code]

Member Avatar for rowly
0
128
Member Avatar for andriss

[COLOR=#000000]Good day,[/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000]I need help from you.[/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000]I have to split and create output files by every 30.000 recordings. [/COLOR] [COLOR=#000000]Example ,[/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000]Input file has 150.000 (transaction.txt) recordings of bank accounts transactions.[/COLOR] [COLOR=#000000]The C code has to split this file and create output files …

Member Avatar for Ancient Dragon
0
100
Member Avatar for BombAppetit

greetings i'm really stuck now. i'm making a bootloader for my PIC and i can't really tell what is wrong with my simple line of codes. [CODE] counter = 1; for (counter = 1 ; counter <= linelength ; counter++) { output_b(counter); GetAndBurn(counter); if (transmissionflag = 0) break; else; if …

Member Avatar for Salem
0
108
Member Avatar for kissiwat

What am I trying to establish here... jolly good question :eek: Pretty simple piece of code really but can I get this wretched thing to do as its asked - can I as heck... All it needs to do is display the type of clothing to be worn in certain …

Member Avatar for Infarction
0
111
Member Avatar for vitrag

I am Software Engineer......n i m thinkin to develop my carrer in[B]Technical Recruiter(TR)[/B]......is it worthful or not.....:rolleyes:

Member Avatar for vitrag
0
53
Member Avatar for GreenDay2001

well i am a high school student and we'll study pointers within next month and i am trying to understand it right now. but what i could understand is what is its use, advantages and for the most that pointer concept is not very clear to me. so i would …

Member Avatar for vitrag
0
92
Member Avatar for nimmi

plz help me i need code for binary to decimal and using only functions not arrays .

Member Avatar for Salem
0
62
Member Avatar for rowly

hello, i have a problem with printing records[i].M_F on the screen while reading from a binary file. i'll appreciate any help ! THank U [code] [COLOR=#0000ff]#include[/COLOR][COLOR=#000000] [/COLOR][COLOR=#800000]"stdafx.h" [/COLOR][COLOR=#0000ff]#include[/COLOR][COLOR=#000000] [/COLOR][COLOR=#800000]<stdio.h> [/COLOR][COLOR=#0000ff]#include[/COLOR][COLOR=#000000] [/COLOR][COLOR=#800000]<stdlib.h> [/COLOR][COLOR=#0000ff]enum[/COLOR][COLOR=#000000] sex {m, f}; [/COLOR] [COLOR=#0000ff]struct[/COLOR][COLOR=#000000] student { [/COLOR] [COLOR=#0000ff]char[/COLOR] fname[40]; sex M_F; [COLOR=#0000ff]int[/COLOR] S_AGE; [COLOR=#0000ff]double[/COLOR] W; }; student …

Member Avatar for Ancient Dragon
0
109
Member Avatar for Iron_Cross

I've been wondering about console programming. Not the book example type stuff, but the 'real' console programming. Stuff that seems to use things like ncurses, or something like that I assume. I found a good tutorial on what I'm looking for: [url]http://www.adrianxw.dk/SoftwareSite/Consoles/Consoles1.html[/url] but I'm wanting something that goes a little …

Member Avatar for Ancient Dragon
0
199
Member Avatar for morning_star_18

Hi, I have a homework assignment that is giving me some problems. I need to make a pyramid of * with a spaces and n rows long. It should look something like this: ____* ___* * __* * * _* * * * * * * * * I have …

Member Avatar for WolfPack
0
125
Member Avatar for Line

Hey! I'm writing a program and currently having trouble with getting a written line typed in by the user to be copied correctly into another array... I'm using a for-loop to run through the original char-array, but if I type in "Hello" the program will give me this result: Param …

Member Avatar for Line
0
100
Member Avatar for kimw

I would like to implement a function similar to the math function from excel, that is, given a vector and a value in the vector, return the relative position of that value in that container. However, my code [CODE]vector<double> vec; double x = 25.0; int pos = 0; for (int …

Member Avatar for Ancient Dragon
0
99
Member Avatar for tarakant_sethy

hi i m a new member. i have a question. so plz answer me if any one have the answer. how can i delete a node without traversing the linkedlist. let's say want to delete the third node of the linkedlist without traversing it. thank u

Member Avatar for Ancient Dragon
0
79
Member Avatar for sugantha

Hi friends,my prof has just given me the code that changes the size of the cursor.....the code is heavy in the use of registers ,inregs,outregs etc and I dont even know where to start googling from...so can you tell me what inregs and outregs do and just give me a …

Member Avatar for Ancient Dragon
0
103
Member Avatar for confused!

Hello! I am a student taking an intro to programming class and I am completely LOST. The assignment is to write a program that simulates an adding machine. I have been working on this for 3 hours and so far I have only been able to get the first line …

Member Avatar for ~s.o.s~
0
297
Member Avatar for gampalu

Do you know where can I find a Class to operate with matrixes with a fast algorithm? (the class should also have the inverse method) thanks in advance

Member Avatar for Ancient Dragon
0
61
Member Avatar for kissiwat

Apparently this was originally posted in the wrong area :rolleyes: :rolleyes: Anyway.... bit of a cheek I know but if you're feeling ultra generous with your knowledge but can anyone write some code in C using if statements for the following: "A car costs a certain amount. If it is …

Member Avatar for Ancient Dragon
0
105
Member Avatar for dev.cplusplus

hi, I have the following problem, I working with the variable "COleDateTime". I have the following code: [code] DATE CurrentTime = COleDateTime::GetCurrentTime(); [/code] This returns the current time of the system Do you know how to add to this current time seconds, minutes, days? Also I need to get two …

Member Avatar for Ancient Dragon
0
648
Member Avatar for boujibabe

This program is supposed to take in four scores two are assignment scores and the other two are test scores it should only take in score that are 0 to 100 me test chain goes someting like this [code] //check for valid data if (test1<0 ||test1>100)&& (test2<0||test2>100)&& (assign1<0||assign1>100)&&(assign2<0||assign2>100) { printf("Error …

Member Avatar for ~s.o.s~
0
91
Member Avatar for CDROOM

Hi I'm biggener in c language and I hope from every one in this forum help me. now I will start first Q How I can write a c program to comput the sum of sequres of numbers from m to n . for exsample : from3 ot 6 : …

Member Avatar for cime63
0
131
Member Avatar for rowly

Hello, how can i check that pushing characters into stack is successful (logically)?

Member Avatar for rowly
0
97
Member Avatar for joey z

Hi yall, Absolute C++ newbie here. I would like to know how to prompt a user to enter yes or no, and then display a different msg depending on whether y or n was pressed. I am trying to set char y=1 or true and char n=0 or false. But …

Member Avatar for ~s.o.s~
0
173
Member Avatar for lalalu

i get this error while compiling my .o file (object file) Data.c:24: error: field `HtStatus' has incomplete type Data.c:25: error: field `DcStatus' has incomplete type [code] struct database { struct hStat HtStatus[SIZE]; struct dStat DcStatus; }; struct hStat { //something; }; struct dStat { //something; }; [/code] do i need …

Member Avatar for ~s.o.s~
0
46
Member Avatar for Phazawhy

:!: [B]Im need to create a program for my requirement that will output: [/B] [B]Enter Any Word: ____ -(i typed Hello)[/B] [B]Hello[/B] [B]Hell[/B] [B]Hel[/B] [B]He[/B] [B]H[/B] [B]i think that i should use for and strlen but i cant make strlen work. please help[/B] Thanyou,

Member Avatar for ~s.o.s~
0
99
Member Avatar for djskip

[COLOR=#000000]Write a program that calculates and prints the bill for a cellular telephone company. The company offers two types of services: regular and premium. Its rates vary depending on the type of service. The rates are as follows:[/COLOR] [COLOR=#000000]Regular service: $10.00 plus first 50 minutes are free. Charges for over …

Member Avatar for DavidRyan
0
166
Member Avatar for Harkua

I've decided to take on a quick approach to something different besides what's taught in my class right now, but I digress. I was wondering what would be a smooth way to integrate not just one, but more than one characters in a turn-based fight. Do you think randoms determining …

Member Avatar for ~s.o.s~
0
91
Member Avatar for alan_b

Do you have any algorithms I can look at that will perform escape logic on a base64 and hex encoded message? Thanks

Member Avatar for alan_b
0
93
Member Avatar for jrivera

I'm very uneasy when it comes to coding STL. I am ok using STL functions and STL container's etc, in main, but I now need to create my own template. Here is what I'm asked to do, and yes it is homework: Write a template container class, Pos_Neg_Array. This is …

Member Avatar for ~s.o.s~
0
95
Member Avatar for hazdude

can anyone help me with some c++ coding? I want to create a piece of code that would allow me to type in any random 30 numbers and for them to come out in ascending order. Any help would be greatly appreciated Hazdude

Member Avatar for rowly
0
90
Member Avatar for kararu

I am starting to use GDB, It can take in only executable form programs as argument is it? Or there are other options. I need to use gdb on a non-exe program directly.Can I do it?

Member Avatar for jim mcnamara
0
84
Member Avatar for xicestorm

I am working with a dateType class and need to make a function to show next day and the previous day. I have my function set using const keyword so that it can't be changed by users, but now I can't increase my day. help??? [code] [COLOR=#0000ff]int[/COLOR][COLOR=#000000] dateType::nextDay() [/COLOR][COLOR=#0000ff]const [/COLOR]{ …

Member Avatar for andrax
0
87
Member Avatar for GreenDay2001

i have searched a lot for win 16 api tutorials but got only win32 api tutorials. i would like to start learning api with 16 bit and then 32. I would like to know some win16 api tutorials on web.

Member Avatar for Ancient Dragon
0
115
Member Avatar for darkeinjel04

here's anader program.. the output should be like this.. 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 ........ and here's d c0de..dunn0 if this is right.. #include<stdio.h> const int leftcorner=1; const int rightcorner-=1; const int topelement=1; int *pascal trianglr=0; int buildtriangle(int tmpPascalrow; { …

Member Avatar for Infarction
0
147
Member Avatar for Mr.UNOwen

Hello everyone, This is my first time here. I happen to run into this site as I was looking for solutions for some c program I have to write for my programming class. Anyway I'm running into issues that I just don't see any reason for why they are happening. …

Member Avatar for Mr.UNOwen
0
151
Member Avatar for darkeinjel04

Here's my Prog...i dunno how 2 convert it...pls check.. its a pyramid... #[code] #include<stdio.h> main() { int a, b, c, d=0; clrscr(); printf("Enter a No:"); scanf("%d",&c); for(a=1;a<=c;a++) { for(b=1;b<=c*2-1;b++) if (b<=c+d&&b>=c-d) printf("*"); else printf(" "); printf("\n"); d++; } getch(); } [/code] is my program correct? the output must be..a pyramid

Member Avatar for darkeinjel04
0
413
Member Avatar for Ahmed Waheed

[COLOR=Black]:) please,want help: how can i read line "Message ended with <CR><LF> " from serial port buffer using ReadFile() API function . I was do that and worked good ,but when enter into large for loop it returned NULLs. so i want to know where is the problem?!! :rolleyes: thanks …

Member Avatar for Nick Evan
0
99
Member Avatar for redstar

Hi i have this program and have a problem it is a basic program for exponents and now i need to add a while loop so that if the user enters a number greater that 10 it asks them to input a number lower or equal to 10, here is …

Member Avatar for Nick Evan
0
278
Member Avatar for friendz_
Member Avatar for Ancient Dragon
0
54
Member Avatar for hariza

Hi Guys, I'm trying to remove all the special characters within a file using the code below but I need to remove also the doble quotes " but what should I use to enclose the characters. I've been looking but can't find. Thanks. while (sep != 0) { sep = …

Member Avatar for hariza
0
549
Member Avatar for jeffssmith

I'm taking CSCI 230 and was able to get a triangle to print with the following code. I can't get anything to work for a circle or rectangle (similar in size). Can anyone help? Thanks. #include <stdio.h> int main() { int t; int x = 0; int y; t = …

Member Avatar for andor
0
82
Member Avatar for highlanda

Main problem i am having is that with the program it can have a 2 string equation - eg 25 R or 25 S (Reciprocal and Squareroot) or a 3 string equation where the second string will be a number and the third string will be the operator. eg 10 …

Member Avatar for andor
0
103
Member Avatar for boujibabe

this code to convert pounds to barbados dollars given a constant rate the price cannot go over $100 when i first run it and input a number under 100 it tells me that it is invalid and sometimes i get nothing at all. Can neone tell me why? [code]/* This …

Member Avatar for ~s.o.s~
0
80
Member Avatar for SammyHasibi

[code] { FILE *scorefile; int score; int temp; scorefile = fopen("scores.txt","r"); if (scorefile == NULL) printf("Error opening input file\n"); else { temp = 0; while (feof(scorefile) <= 0) { fscanf(scorefile,"%d",&score); temp = temp +1; } } fclose(scorefile); printf("Temp = %d\n",temp); system("pause"); return(0); } [/code] The program counts the number of …

Member Avatar for andor
0
249
Member Avatar for zac_haryy

Well I have started writing a code to create this program that i have to have done by tommorow but i am stuck at the moment. Anybody please help!! Here is the problem: Write a prgram that converts numbers to words. For examlpe, 834 should result in "eight three four." …

Member Avatar for ~s.o.s~
0
101
Member Avatar for amishosh

Hi! I have functions defined in ami.c and want to call them from friedman.c how do I link the 2? Thanks Ami

Member Avatar for ~s.o.s~
0
250
Member Avatar for gobiv

I need to write simple program in C++! I need to write program that read information from file,which contain <50,students name and respective score.My program need to calculate average score and print out students name,who get below average mark to screen!But,i don''t know how to use string to do it.... …

Member Avatar for gobiv
0
113
Member Avatar for Sivakumar_K

[B][COLOR=darkorange]My resource.h file:[/COLOR][/B] [code] #define IDR_MYMENU 101 #define IDI_MYICON 201 #define ID_FILE_EXIT 9001 #define ID_STUFF_GO 9002 #define ID_STUFF_ABOUT 9003 #define IDD_TOOLBAR 9004 #define IDC_PRESS 9005 #define IDC_OTHER 9006 #define ID_DIALOG_SHOW 9007 #define ID_DIALOG_HIDE 9008 #define ID_HELP_ABOUT 9009 #define IDD_ABOUT 9010 [/code] -------------------------------------------------------------------------------------- [B][COLOR=darkorange]My resource.rc file:[/COLOR][/B] [code] #include "windows.h" #include "resource.h" …

Member Avatar for Ancient Dragon
0
81

The End.