19,876 Topics
![]() | |
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 … | |
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.... ![]() | |
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 … | |
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] | |
[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 … | |
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 … | |
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 … | |
I am Software Engineer......n i m thinkin to develop my carrer in[B]Technical Recruiter(TR)[/B]......is it worthful or not.....:rolleyes: | |
![]() | 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 … |
plz help me i need code for binary to decimal and using only functions not arrays . | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
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 : … | |
Hello, how can i check that pushing characters into stack is successful (logically)? | |
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 … | |
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 … | |
:!: [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, | |
[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 … | |
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 … | |
Do you have any algorithms I can look at that will perform escape logic on a base64 and hex encoded message? Thanks | |
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 … | |
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? | |
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]{ … | |
![]() | 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. |
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; { … | |
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. … | |
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 | |
[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 … | |
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 … | |
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 = … | |
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 = … | |
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 … | |
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 … | |
[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 … | |
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." … | |
Hi! I have functions defined in ami.c and want to call them from friedman.c how do I link the 2? Thanks Ami | |
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.... … | |
[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" … |
The End.