49,761 Topics

Member Avatar for
Member Avatar for hsiaoyk901201

hello, i am a C beginner. please check the code for me. The program is running fine,but is not giving the correct output or should is say no output. The output supposed to give the code of the team that ranked higher. #include <stdio.h> char rankTeams(int, int, int, int, char, …

Member Avatar for Anirudh Rb
0
201
Member Avatar for dragon_chick

Hi all. I'm writing a program to explain and verify the birthday paradox. I am generating 1000 sets (only 10 to test with) of birthdays, checking for matches, then displaying the results. I'm using srand to seed my generator and rand() to get 23 sets. The problem is 2-fold. 1) …

Member Avatar for dragon_chick
0
412
Member Avatar for Zssffssz

Ok this is somewhat of a second related post of my other one "C++ File". There is no need to read the other post just want to tell you. I want to make a console app that does the XOR thing I heard about using the simple ifstream and ofstream …

Member Avatar for doug65536
0
229
Member Avatar for anujthefuhrer
Member Avatar for anujthefuhrer
Member Avatar for dospy

when you want to decript a program's protocol how do you do it? you use an packet listener(eg. WireShark) and try to figure out what each packet means? is this the only solution? cuz it seems to me like a lot of hard work, is there anything to make this …

Member Avatar for dospy
0
181
Member Avatar for coolboym99

So I'm writing a personal program right now that basically I want it to help keep me from getting distracted when at school or work, essentially letting me only access the programs that I need when at those places. My question is, whenever a program comes up in windows 7 …

Member Avatar for doug65536
0
156
Member Avatar for anujthefuhrer
Member Avatar for Wootens

Hey guys, I'm having some difficulties with this program I've been working on. Its composed of a few parts but I'm just focused on creating a linkedlist for this class. I'm trying to create seperate linkedLists for each class I'm making (just focused on teachersList) and I've been getting some …

Member Avatar for doug65536
0
111
Member Avatar for Info_stealth13

I want to have a code to this problem in C++. please help me!!! Here the problem!!! "The rate of increase in population of a certain kind of bacteria is proportional to the population at any time. if in the last eight years, the population increased from 50000 to 120000,what …

Member Avatar for frogboy77
0
132
Member Avatar for Shodow

can u help me convert the cout to printf..i dont have a clue how.. tnx [CODE]#include<iostream.h> #include<string.h> #include<conio.h> int findSimilar(char[],char[]); void checkValue(int,int); int main(){ char boy[50]; char girl[50]; int similarInBoy=0; int similarInGirl=0; int total; clrscr(); cout<<"Enter Boy's Name: "; cin.getline(boy,50); cout<<"Enter Girl's Name: "; cin.getline(girl,50); similarInBoy=findSimilar(boy,girl); similarInGirl=findSimilar(girl,boy); total=similarInGirl+similarInBoy; cout<<"Boy: "<<similarInBoy<<","; …

Member Avatar for Narue
0
551
Member Avatar for anujthefuhrer
Member Avatar for doug65536
0
841
Member Avatar for Rubinder singh

I have been using code blocks for c++ i has mingw compiler which is using gcc it doesn't have conio.h header file so how do i clear the screen now ................? thanks

Member Avatar for NP-complete
0
295
Member Avatar for a.muqeet khan

[CODE]// algo assignment.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include<iostream> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { int DATA[5]; DATA[0]=0; DATA[1]=10; DATA[2]=80; DATA[3]=1; DATA[4]=5; int a;int temp; int i,j; for (i=0;i<5;i++) { temp=DATA[i]; // at starting it means that it has value …

Member Avatar for a.muqeet khan
0
219
Member Avatar for nicemark

** hi guys .. i nid to finish it until tomorrow morning .. the Admin [B]USERNAME [/B]is [B]IT2B[/B] and the [B]PASSWORD[/B] is [B]MANALO[/B] .. can someone help me here in my HR SYSTEM .. can you do the edit and delete function for me. or give me a little idea …

0
60
Member Avatar for Zssffssz

ok from all of my questions you can probably tell I'm working on something. I want a file to open my program when it is double clicked on (ex .txt opens notepad) I know how to modify the registry n stuff what I need is how to make my program …

Member Avatar for Zssffssz
0
152
Member Avatar for neoj88

I have been working on a program and it almost totally works. This is what it's supposed to show: Enter Player Name (Q to quit): Bob Enter score for Bob: 3245 Enter Player Name (Q to quit): Sue Enter score for Sue: 1098 Enter Player Name (Q to quit): Dave …

Member Avatar for neoj88
0
142
Member Avatar for Zssffssz

There wasn't anything on it that I've seen. When using ofstream how do I change the font im wrritting with?

Member Avatar for Zssffssz
0
100
Member Avatar for John Does

Could you tell me where to place the input file in xcode? It builds and runs the program, but it only shows the functions that are outf. So, I think it's not seeing the input file, and I know the program works the way I intended, because it outputs perfectly …

0
66
Member Avatar for hsiaoyk901201

I am a beginner of C++. i want to print out the list like the following [ATTACH]22433[/ATTACH] but what i get is this [ATTACH]22435[/ATTACH] and this is my code [ATTACH]22436[/ATTACH] It looks like i did something wrong when i trying to assign the value that i calculated to the array …

Member Avatar for hsiaoyk901201
0
144
Member Avatar for Marissak

The question I'm trying to answer is: Write an object oriented C++ program to translate an infix expression to postfix. I have done much of it but after I debug the only output is "Postfix:" and I cannot figure out why. This is my code so far: #include <iostream> #include …

Member Avatar for GouseKSyed
0
230
Member Avatar for SCass2010

Hi everyone again :) Bit of a weird problem, but is there any way of counting how many keys are stored within a multimap? Say for example I have the keys A, B, C and D. Each of these keys have say 100 values for each, so there should be …

Member Avatar for vijayan121
0
1K
Member Avatar for math_girl123

Hello fellow programmers :)) just started c++ a month ago and in need of major helpzz!! so basically I need code that: INPUT NUMBER-->BASE OF NUMBER-->PRINTS DECIMAL REPRESENTATION OF IT Im trying this code..when i put any number and base I just get 0 pleaxxxx help!!! ty all!! [CODE]#include <iostream> …

Member Avatar for Taywin
0
88
Member Avatar for meli123

Hey guys Im trying to create a code where: input A: number Input B: Base Print: Decimal form I am going to use algorithm where u do following: NUMBER % BASE but it would do it the number of times that the base is.. so if its 6 (base 2) …

Member Avatar for doug65536
0
113
Member Avatar for Zssffssz

Ok I know the basics of ofstream and ifstream but it seems as if every tutorial on it leaves this out. How do I delete files in c++ console app. Reason? I want to use a temporary file in my app for transferring betting two programs that open and to …

Member Avatar for NetJunkie
0
179
Member Avatar for knightofsoshi

[CODE] void customer (struct data *cust1); void menu(); void printReceipt(struct data *cust1, float &balance); struct data{ char name[20]; int accno; }cust, *cust1;[/CODE] above is an excerpt from my completed c++ program. my c++ coding is running well and i dont have a problem with it, but i am required to …

Member Avatar for AceStryker
0
245
Member Avatar for u8sand

Ok so I've used function pointers for some time. I was trying to figure out if this was possible. First. It IS possible to convert a function pointer into an array of bytes. It is also possible to reconstruct that function with the bytes in that array. I would like …

Member Avatar for doug65536
0
269
Member Avatar for meli123

can someone please give me some basic code sample using MOD op for decimal to binary up to BASE 10 ty ex. input 110 base 2 print 6

Member Avatar for Taywin
0
276
Member Avatar for NoUserNameHere

How would I trace the steps for the function's output? [CODE]int f(int n) { if (n==0) return 1; else if(n==1) return 2; else return 2* f(n-2) + f(n-1); }[/CODE] Would it be something like: (Let's say n=6) step 1) 2 * f(6-2) + f(6-1) 2) 2 * f(4-2) + f(5-1) …

Member Avatar for Taywin
0
89
Member Avatar for the_kitoper

[CODE] int foo(gpointer kitty) { g_print(kitty); } int main(int argc, char* argv[]) { gtk_init(&argc, &argv); gtk_timeout_add(1000, foo, (gpointer)"1"); gtk_main(); }[/CODE] How would I go about stopping the timeout?

Member Avatar for pseudorandom21
0
69

The End.