19,876 Topics

Member Avatar for
Member Avatar for Tales

I need to find a way to convert char[] to TCHAR[] I did my best to find it, but all I could find was char[] to wchar_t[] using... int swprintf( wchar_t *buffer, const wchar_t *format [, argument] ... ); Help please!

Member Avatar for Ancient Dragon
0
113
Member Avatar for shmay

I want to get really good at c programming. I'm in the middle of a C class at the moment so I know the basics. What are some good assignments that are tough, but if finished will help one greatly? Thank you.

Member Avatar for John A
0
55
Member Avatar for CRD

Is there any place that I can find what functions are available in what headder files? Dick

Member Avatar for CRD
0
72
Member Avatar for SHWOO

I am writing a class character for an assignment. The class relates to a role playing game. I am getting an error which I don't understand. This error occurs in the default constructor of the implementation file. The dynamic help says that I created an object without creating a pointer …

Member Avatar for vijayan121
0
147
Member Avatar for Lardmeister

Does anyone know of anyplace/anybody that teaches C# at the highschool or college level to get students used to a programming language?

Member Avatar for pygmalion
0
101
Member Avatar for mathgirl

Leap Years Def: A year is a century year if it is divisible by 100. Def: A year is a non-century year if it is not a century year. Def: A year is a leap year if it is a non-century year that is divisible by 4, or a century …

Member Avatar for Ancient Dragon
0
365
Member Avatar for wujianwei

if you type "123e1" in the command line, the system may read "123" and save the value. but how can we tell the computer that it's an wrong input?:-|

Member Avatar for WaltP
0
98
Member Avatar for satish.paluvai

Memory allocation of variables declared in a program is ------ a) Allocated in RAM b) Allocated in ROM c) Allocated in stack d) Assigned in registers. which one is correct please tell me the answer in 24 hrs...

Member Avatar for desijays
0
97
Member Avatar for s1lang

Here is my problem I have a league system, however to input a teams score, I select the team via input of an int ID number (int) however I need to enter a the Team name (String) from the array. I cannot get it to work. Can someone please help …

Member Avatar for s1lang
0
89
Member Avatar for kenjutsuka

[code] void entry(int itemsales1[255][255], int itemcount1, string itemnames1[255]) { int count; char *days[]={"Monday", "Tuesday", "Wednesday", "Thursday", "Friday"}; cout << "Enter item's name: "; cin >> itemnames1[itemcount1]; for (count = 0; count < 5; count++) { cout << "Enter " << days[count] << " sales: "; cin >> itemsales1[itemcount1][count]; } return(itemsales1, …

Member Avatar for kenjutsuka
0
94
Member Avatar for Matt Tacular

I am making a tic tac toe game, and for the grid, I had originally made 9 variables to represent the grid's spaces, but instead, I would now like to use a single char array. I can make the array and print certain parts, but I can't change them. For …

Member Avatar for WaltP
0
97
Member Avatar for galmca

i've written a code for insertion in a linked list for all the 3 cases that is ...at the end,in the beginning & in between.....when i run this code then it runs successfully for insertion at end and in the beginning ,it is also showing no errors while compiling the …

Member Avatar for John A
0
179
Member Avatar for yaya_star

i need a code, that generate a 100 array of size (10) and 100 array of size of(50), and 100 array of size of(100), and 100 array of size of(200),with random numbers, then for the 1oo array of size(10), in log file then for each array of the 100 array …

Member Avatar for jan1024188
0
262
Member Avatar for shmay

For my C class, I have to write a program where the user enters how many fahrenheits he will be entering, but the fahrenheits have to be in an array. So a dynamic array seems the obvious choice. In main, we can only have initializations and function calls. For example, …

Member Avatar for ft3ssgeek
0
212
Member Avatar for kevinmscs

I have this error but cant seem to see why. This code compiled would give 1 error. Anyone please advise, thanks. [code] #include <string> using namespace std; class Beverage{ protected: Beverage *beverage; string desc; public: friend class Bev_Iterator; Beverage(){ beverage = 0; desc = "unknown beverage"; } virtual string getdesc(){ …

Member Avatar for Infarction
0
98
Member Avatar for pooja_singh

hi!!! this is pooja and i need some help desperately.... i have been told to submit my project in 15 days on airline reservation ..using graphics,filemanipulation,friend function,inheritance and all such features.... prob ic dat file manipulation is yet not taught and inheritance is still too new ..never d less i …

Member Avatar for WaltP
1
316
Member Avatar for XxBigxBossxX

I'm trying to code the game of Simon(try to mimic the computers choice of four buttons) for a project. I'm kind of stuck because the computer generates a random choice, but I need to completely halt and wait for the user to enter his choice.(Done with the aswd keys; either …

Member Avatar for John A
0
77
Member Avatar for jerryseinfeld

Hi I am a new c+ student. I can make only simple calculator or find some average number programmes.... But now I have though one for me :( I need a program to find word in nxm puzzle and print its location... words may have been located directions.. I mean …

Member Avatar for Lerner
0
192
Member Avatar for Shaabangbang

hey guys, uhh ok remember the old addressbook problem? well i solved it :cheesy: ! but now my prof gave us the same assignment but we have to do it as linked lists.. and i dont know how to use linked lists quite well yet.. this is my original code …

Member Avatar for Clinton Portis
0
101
Member Avatar for Praetorian

My prof. gave us this class project to do and we had to more or less fill in the blanks. So here is what i have for my code and it works up to the point where it asks you if you want to go first or not. So weather …

Member Avatar for Praetorian
0
387
Member Avatar for ATXFG

Here is the list of instructions on this assignment I am currently working on: [B]Implement a Base 7 or Base 21 InsertionSort algorithm[/B] [LIST] [*] Input: File containing a list of Base 21 numbers[LIST] [*]Name of this file is supplied on the command line [*]First element in file is number …

0
39
Member Avatar for tousifpk

plz write newfunc() . A TSR program that changes the background color of the screen to red whenever ‘Ctrl’ is pressed and white whenever ‘Left Shift’ is pressed. It should not modify the text displayed on the screen. Hint: Intercept Keyboard interrupt (0x09H) Use video text memory address 0xB000000H [code=c] …

Member Avatar for WaltP
0
83
Member Avatar for zaacze

hi! am supposed to make a program, where information are in a structure and should be able to store up to 100 records.. i was able to make the add and display feature.. but now, i am having a hard time with displaying a particular record given the kind.. well, …

Member Avatar for WaltP
0
113
Member Avatar for SHWOO

Can anyone explain why I am not getting any output from this code [code] int _tmain() { String *sym[] = {S"BA", S"CA", S"MS"}; int shares __gc[] = {25, 100, 30}, price __gc[] = {25, 31, 37}; Random *randomCurVal = new Random(); int purVal, curVal; int totalPurVal = 0, totalCurVal = …

0
80
Member Avatar for rowly

Hello guyz i'm trying to write a stack program in C... Push one character onto the stack. Your function should have the prototype: void push(POINTER *Top,stackitem a); 2. Push a string of characters into a stack. Your function should have the prototype: void push_string(POINTER *Top,char *string); Your implementation should make …

Member Avatar for rowly
0
1K
Member Avatar for aPPmaSTer

I made a dynamic 2D array using 'calloc', but when I try to fill it, I get the following error: [INLINECODE]name lookup of `j' changed for new ISO `for' scoping [/INLINECODE] Here's the part of the code where it stops: [CODE=c] for(int j=count;j<prod;j++); { ct[j][0]=50+(j-count+1)*offset; //error here count++; } [/CODE] …

Member Avatar for aPPmaSTer
0
212
Member Avatar for muggle_spy

[COLOR=purple][B]I NEED HELP WITH THE 4-QUEENS PROBLEM.:rolleyes: [/B][/COLOR] [B][COLOR=#800080]I HAVE TO BUILD A PROGRAM FOR 4 QUEENS SOLUTION USING C.......:?: [/COLOR][/B] [B][COLOR=#800080]FOR MY DATA STRUCTURE PROJECT.[/COLOR][/B] [B][COLOR=#800080]CAN ANY1 HELP ME WITH THE SOLUTION FOR THIS....... I NEED THE PROGRAM......[/COLOR][/B] [B][COLOR=#800080]THE QUESTION IS THAT: [/COLOR][/B] [B][COLOR=#800080]U HAVE A 4*4 CHESSBOARD. PLACE …

Member Avatar for muggle_spy
0
148
Member Avatar for FC Jamison

Last quarter our last assignment was to create two programs that gernerate silly sentences from words contained in a file. I was able to create the program with a map, but have no idea how to do it with a hash map. Since it was the end of the quarter, …

Member Avatar for iamthwee
0
189
Member Avatar for hkBattousai

I want to create a low level keyboard hook. I tried the code below : [code]LRESULT CALLBACK LowLevelKeyboardProc(int nCode, WPARAM wParam, LPARAM lParam) { if (nCode < 0) return CallNextHookEx((HHOOK) WH_KEYBOARD_LL, (int) nCode, (WPARAM) wParam, (LPARAM) lParam); DebugText("KB Event!"); return (LRESULT) NULL; } HHOOK hHook; hHook = (HHOOK) SetWindowsHookEx( (int) …

0
69
Member Avatar for guy40az

I have a general question about compilers, I just want to know the opinions of people that have been using them for a while. I want to know what is your favorite one (the name and version) and why you like it the best.

Member Avatar for WaltP
0
140
Member Avatar for afr02hrs

Can anyone spot the semantic error in this triangular number calculator here? It correctly reports 21 as being a triangle number but incorrectly that 15 is not a triangle number. However if you input 15 as the first value entered it correctly says that 15 is a triangle number!! [code] …

Member Avatar for John A
0
156
Member Avatar for i_like_pi

Does anybody know how to use integers larger than the "long long int" type? I have tried using arrays of ints, but mathematical functions are impossible. Thanks in advance. :cheesy:

Member Avatar for i_like_pi
0
90
Member Avatar for jan1024188

Hello, Id like to know how to merge two files: icon.ico and file.exe thanks in advance, Jan

Member Avatar for jan1024188
1
118
Member Avatar for Tales

I have a little annoying problem and I really need help. I need to convert a char* to TCHAR* and I can't... I have tried everything and nothing seems to help... TCHAR text1[ ] = ""; char *key; key[0] = 'a'; key[1] = '\0'; text1 = _T(key); //Does not work …

Member Avatar for dubeyprateek
0
258
Member Avatar for Chimera

[CODE=c]#include <stdio.h> #include <string.h> #define MAXLON 10 #define N 6 int main(void) { int opcion, elocal=-1, evisitante=-1, resultado, lista_puntos[N]={0,0,0,0,0,0}, i, o, ganador; int resultados[N][N]= {{-1, -1, 0, -1, 2, -1}, { 1, -1, 1, -1, -1, 1}, {-1, -1, -1, -1, 0, 0}, { 1, 1, 2, -1, -1, -1}, …

Member Avatar for Chimera
0
276
Member Avatar for arunk8186

Hi friends, I have written a C program which involves some iterations of numbers that I input in a table. >> Now I want to know how to import these values say from excel or some text instead of me inputtin them.... Any suggestion wil bw very helpful. Thanks and …

Member Avatar for arunk8186
0
134
Member Avatar for Eyies

Hey all, I'm new to this forum, first post.. so please excuse me (also excuse the perhaps not so eloquent style, it is still in preliminary!) =). I'm writing a short piece of code in compliance with a webserver I've been programming with a group. This code is to auto …

Member Avatar for Eyies
0
101
Member Avatar for Ene Uran

Illustrates the close relationship of the hard-software industry to April first: [CODE=c]#include <nonsense.h> #include <lies.h> #include <spyware.h> /* Microsoft Network Connectivity library */ #include <process.h> /* For the court of law */ #define say(x) lie(x) #define computeruser ALL_WANT_TO_BUY_OUR_BUGWARE #define soon next_year #define the_product_is_ready_to_ship another_beta_version void main() { if (latest_window_version>one_month_old) { …

Member Avatar for thekashyap
0
158
Member Avatar for gpta_varun

Hi All I have a header file link.h , in which i declare a variable itemp. When i assign this variable a value in the C file link.C i get an error during compilation: cxx: Error: link.C, line 5: this declaration has no storage class or type specifier itemp=0; ^ …

Member Avatar for gpta_varun
0
164
Member Avatar for bigben09

Hey I want to be able to put a movie title in the is more than one world and it goes crazy when i do, if you run my program and enter one word when it asks for the movie title it will work fine. but when u enter a …

Member Avatar for WaltP
0
111
Member Avatar for mohiuddin.shaik

main() { if( ? ) { printf("welcome"); } else { printf("to ieg"); } } ----------------------------------------------------------------------- Output should be welcome to ieg [B]what should come in place of ' ? '[/B]

Member Avatar for John A
0
95
Member Avatar for Tim Gleebitz

Hi fellow programmers. I'm quite new to 'C' and I’ve been working on this personal project recently and have struck a spanner in the works! I am quite bemused by this piece of code I am to assemble (below). I think it’s fairly simple but can’t quite grasp it! Any …

Member Avatar for John A
0
114
Member Avatar for Talkin Tosh

Hi guys, I'm looking for a bit of help with an assignment. I'm not to hot with C but its a compulsury module so what can i do! Basically the assignment wants me to make a record data type, that describes a lecturer. There are different fields are ints, char, …

Member Avatar for Ancient Dragon
0
84
Member Avatar for 123abcd1983

Hi, I have some problem by using the midi file. I wish to control the left and the right channels volumes, and i got some information from msdn library, but it didn't tell me the exact way to do it. Could anyone tell me what is the meaning of [B][I][COLOR=sienna]"The …

Member Avatar for WolfPack
0
495
Member Avatar for ferrant

Hi, I am getting warnings when I export a class that contains an STL deque. Note that for a simple stl vector there are no warnings, only for the deque ... I applied the rules defined on the msn page : [url]http://support.microsoft.com/kb/168958[/url] But still get a compile warning that I …

Member Avatar for ferrant
0
212
Member Avatar for muggle_spy

I M A Program Beginner In C. Can Any 1 Help Me Wid How To Create Files In C.

Member Avatar for Ancient Dragon
0
53
Member Avatar for endsamsara

Hi. How can [B]I assign an structure with values[/B] in its fields name=doom memory=1212, time=12, files=2; but dinamically??? so i use malloc sixe of [B]the list does not begin in NULL instead "doom[/B]" i have a menu that insert a new Node, when you press F1 printinscreen when you press …

Member Avatar for Ancient Dragon
0
124
Member Avatar for bashar2007

Hi programmer I am trying to develope aprograme to solve an equadratic equation in , but I still get error output . Any one help me please . bye Bashar

Member Avatar for Ancient Dragon
0
36
Member Avatar for delner

So I'm trying to write a program to simulate Conway's game of life. I thought it'd be cool to declare a class called Cell and use an array of objects instead of an array of ints or bools. My problem is that when I go to compile a function to …

Member Avatar for Salem
0
75
Member Avatar for tripo03

I´ve been programming a B tree structure in C and i had problems because I programmed it in Debian Sarge and when I wanted to compile the source code in other distribution of Linux the program did not work correctly... The IDE i used is Anjuta... Anybody has idea why …

Member Avatar for Salem
0
101

The End.