19,876 Topics
![]() | |
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! | |
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. | |
Is there any place that I can find what functions are available in what headder files? Dick | |
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 … | |
Does anyone know of anyplace/anybody that teaches C# at the highschool or college level to get students used to a programming language? | |
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 … | |
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?:-| | |
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... | |
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 … | |
[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, … | |
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 … | |
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 … | |
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, … | |
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(){ … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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] … | |
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, … | |
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 = … | |
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 … | |
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] … | |
[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 … | |
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, … ![]() | |
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) … | |
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. | |
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] … | |
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: | |
Hello, Id like to know how to merge two files: icon.ico and file.exe thanks in advance, Jan | |
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 … | |
[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}, … | |
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 … | |
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 … | |
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) { … | |
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; ^ … | |
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 … | |
main() { if( ? ) { printf("welcome"); } else { printf("to ieg"); } } ----------------------------------------------------------------------- Output should be welcome to ieg [B]what should come in place of ' ? '[/B] | |
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 … | |
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, … | |
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 … | |
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 … | |
I M A Program Beginner In C. Can Any 1 Help Me Wid How To Create Files In C. | |
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 … | |
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 | |
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 … | |
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 … |
The End.