15,551 Topics

Member Avatar for
Member Avatar for spankyg

This may seem like a dumb question, or maybe I just feel dumb asking it. I have spent hours trying to figure out how to retreive the current MM/DD/YYYY from the system output in that format. strftime? time function? I'm spent! Any help would be great.....

Member Avatar for spankyg
0
105
Member Avatar for rwagnes

I am writing a short c program which simulates resource management on the operating system. The parent process is the resource manager and allocates resources to its children if they are available. I have created the processes and the resources, but I am having trouble communicating resource status between the …

Member Avatar for Narue
0
74
Member Avatar for Ali Shahzad

I need to understand the folowing code return(fab(n-1)+fab(n-2)); As most of u will be fimiliar with this itz to make fabonachi series in C but can any one tell me How the computer Reads it i mean how is the sontrol transfered plzzz

Member Avatar for Narue
0
118
Member Avatar for Malouka

plz someone tell me a program to add 10 numbers using the while(condition) loop very quickly plzzzzzzzz

Member Avatar for ~s.o.s~
0
103
Member Avatar for Thinka

Hey, I'm hoping someone can help out here. I'm trying to use the rand() function to generate sequential random numbers in C, and then write them to file. Now I know it's possible, I'm just not sure whether it is the way I want to do it. I have already …

Member Avatar for Thinka
0
276
Member Avatar for jerryseinfeld

Hi everyone again me again I have lots of questions... I have a program which reads something into a txt file like notepad. But I need to read into a dat file. Here is my code [code] #include <stdlib.h> #include <stdio.h> main() { int employeeNumber; char name[30]; char engineeringDicipline[40]; int …

Member Avatar for jerryseinfeld
0
106
Member Avatar for jan1024188

Hello, I have a problem with my Win32 app. I made a window, and than a Dialog boxes. For window I use one message loop, and for Dialog boxes another. But It seems this wont work: [CODE]while(GetMessage(&Msg, NULL, 0, 0) > 0) { if(!IsDialogMessage(g_hToolbar, &Msg)) { TranslateMessage(&Msg); DispatchMessage(&Msg); } TranslateMessage(&Msg); …

Member Avatar for jan1024188
0
104
Member Avatar for Sacky

Well i'm trying to get the path from which my app was launched so when it gets an exception i can just handle it and restart it, the only solution to this that i found was getenv ( "PATH" ), however doing this yields this: [QUOTE][Sat Apr 28 19:29:37 2007](null)/gtamp.cfg[/QUOTE] …

Member Avatar for Salem
0
85
Member Avatar for cintd

[code = C]struct m_b_e{ int a; struct m_b_e *next;};struct tree{ int b; struct m_b_e *block_list;};and function declarations .. void func(struct tree*);void func_in(struct tree*);definations .. void func(struct tree *p){ struct m_b_e *c,*d; printf("func..\n"); if(!p) return; for(c=p->block_list;c;c=d) { d = c->next; free(c); } func_in(p);}void func_in(struct tree *p){ printf("inner most function\n");}And, pointer p …

Member Avatar for iamthwee
0
89
Member Avatar for shamma

a) Write an algorithm that finds both the smallest and largest numbers in a list of n numbers and calculate its complexity T(n).:-/ b) Write an algorithm that finds both the smallest and largest numbers in a list of n numbers and with complexity T(n) is at most about (1.5)n …

Member Avatar for Lerner
0
75
Member Avatar for jonnymac5987

I am a new user and I do not know how to post my code I wrote to be viewable on this site. If someone could please explain how I would go about doing this i would appreciate it.

Member Avatar for WaltP
0
39
Member Avatar for sunny_xyz
Member Avatar for Salem
0
36
Member Avatar for JINX_

[COLOR=#000000]Dear All,[/COLOR] [COLOR=#000000]Was wondering if there is any way of generating the next values in an array to compute an np-complete system? Ok I know that sounds confusing but this is how it goes: [/COLOR] [COLOR=#000000]Say you have array[4][/COLOR] [COLOR=#000000]First Array is : 1 2 3 4[/COLOR] [COLOR=#000000]Second Array: 1 …

Member Avatar for JINX_
0
126
Member Avatar for amt_muk

Hi Friends, Can any of you pls tell me (in detail) which of the following options will be faster? Option 1: [code] int fun() { if( !cm_aObject ) return -1; return cm_aObject->getNum(); } [/code] Option 2: [code] int fun() { try{ return cm_aObject->getNum(); }catch(...){ return -1; } } [/code] Thanx, …

Member Avatar for vijayan121
0
125
Member Avatar for fightfox06

[code=c] #include<stdio.h> #include<string.h> #include<stdlib.h> #define MAX 20 //struct team_info typedef struct { char team[16]; int played; int won; int drawn; int lost; int goalsf; int goalsa; int goald; int points; int ID; }team_info; team_info arrdetails[12]; int print_header(); void draw_table (); int take_team_input(); int take_team_name(); int save_table(); int read_table(); int sort_table(); …

Member Avatar for thekashyap
0
156
Member Avatar for naya22

I am having problems generating the Fibonacci sequence. I would like to start at 30. Here is my program: #include <iostream> #include <conio> using namespace std; int main() { int Fibonacci, n; cout <<"Here is the Fibonacci number sequence until 30 ."; if ( n==1 || n==2 ) return( 1 …

Member Avatar for ndeniche
0
108
Member Avatar for lionburn50

I have to remove an element from index = 7 from an array and then move the rest of the elements to the positions 7, 8, 9, and so on.. i looked in my book but i cant find the remove code... does anyone know how i can remove the …

Member Avatar for ndeniche
0
222
Member Avatar for mcole50

I cannot find my era as to why the program wont exit. No matter the number i input it still continue to run. If someone cant point out my era it would be highly appreciate.. [code=c] #include <stdio.h> #include <conio.h> #define FROZEN -99 #define BOILING 212 int main(void) { int …

Member Avatar for ndeniche
0
141
Member Avatar for jan1024188

Hello, I made a small app and I wanted to include DialogBox Here is a code: [code]#include <windows.h> #include "resource.h" const char g_szclassName[] = "myWindowClass"; BOOL CALLBACK WelcomeDDlgProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) { switch(Message) { case WM_INITDIALOG: return TRUE; case WM_COMMAND: switch(LOWORD(wParam)) { case IDD_WELCOMED: { int …

Member Avatar for jan1024188
0
159
Member Avatar for monkeyhead

Hi there, I've written a program that calculates the average of a few things. How ever somtimes the average can be say for for example 69.3%. If I was to get that value to show, would I use a float or a double? I've tried using a float but it …

Member Avatar for ndeniche
0
106
Member Avatar for dm215

So here is some sample code: [code] #include<valarray> int main() { std::valarray<double> vec(10); for (size_t i=0; i<11; i++) vec[i] = 1.0; std::valarray<double> vec2(vec); return 0; }[/code] So, in a situation similar to this one, I am segfauting, but not in the loop, rather in the constructor call after the loop. …

Member Avatar for thekashyap
0
159
Member Avatar for toiletduck

Hi everyone. It's my first time here, but I'll try not to be an obnoxious rookie. I'm doing a beginning course in C in college (yeah, original, I know :p), and at the moment I'm trying to work a project. First off, [B]I'm not trying to have someone do the …

Member Avatar for Ancient Dragon
0
90
Member Avatar for ondrej97

I want to run external program to work with a file, which is asociated with that file extension. Example : if file is *.jpg, then I want to run image viewer. I want to do it under Windows.

Member Avatar for Ancient Dragon
0
53
Member Avatar for kendell

hay i need some help here i am trying to do a quick sort this is the code i have and i am getting some errors i do not understand. this is the definition [COLOR=#0000ff]void[/COLOR][COLOR=#000000] quickSort([/COLOR][COLOR=#0000ff]int[/COLOR][COLOR=#000000] numbers[], [/COLOR][COLOR=#0000ff]int[/COLOR][COLOR=#000000] first, [/COLOR][COLOR=#0000ff]int[/COLOR][COLOR=#000000] last)[/COLOR] { [COLOR=#0000ff]int[/COLOR] i, pivot, left, right, mid; [COLOR=#0000ff]int[/COLOR] passes …

Member Avatar for Ancient Dragon
0
123
Member Avatar for monkeyhead

Hi there, I've writiten a program that asks a user to enter X number of users, it then asks the user to enter points and totals up the points. The cycle then runs again, dependent on the value of X. However I would like to obtain an overall average of …

Member Avatar for monkeyhead
0
77
Member Avatar for louis7370

1.Evaluate the following postfix expression using a stack and show the contents of the stack after execution of each operation 5,11,-,6,8,+,12,*,?. [COLOR=#000000]1.Modify the class Node such that the add_node () and del_node()functions are overloaded as the operators, + and -, respectively.[/COLOR]

Member Avatar for Ancient Dragon
0
94
Member Avatar for louis7370

[COLOR=#000000] [/COLOR] [COLOR=#000000]1.You are purchasing a computer. The moment you switch it on it runs automatically with some default operating system loaded in it, default RAM speed, and processor capability. Create a Computer class identifying the different attributes and behaviors. Code the constructor of the class and assign default values …

Member Avatar for WaltP
0
100
Member Avatar for squinx22

can I open a file in a URL? for example: fopen("http://example.com/myfile.htm","r") Will this one work? If not, what are the other alternatives in opening a file in the URL.. thanks...

Member Avatar for squinx22
0
78
Member Avatar for harshavarthini

hi! i need a c program code to display the structure a b c d c b a a b c c b a a b b a a a a b b a a b c c b a a b c d c b a. please help me

Member Avatar for ithelp
0
33
Member Avatar for Futchy

Please answer the following and post your code 1. You were tasked to build a module that calculates and prints the area of a rectangle, perimeter of a rectangle, and volume of a rectangle: Here's the header. calculate.h: void pr(float, float); void ar(float, float); void volume(float, float, float); Create the …

Member Avatar for Ancient Dragon
0
80

The End.