49,761 Topics

Member Avatar for
Member Avatar for clutchkiller

MessageBox(NULL, (LPCTSTR)"Test1", (LPCTSTR)"Test1", MB_OK); This code is popping up the window correctly, but it displays all squares. Whats wrong =(

Member Avatar for Salem
0
108
Member Avatar for makan007

[CODE] #ifndef Test_h #define Test_h #endif [/CODE] May I know what are the above 3 syntax for? How can I use it? Is is used only in header file?

Member Avatar for jonsca
0
142
Member Avatar for techie929

//Here is the function of inserting nodes.I tried using strcmp but its still not working. [CODE] void BinarySearchTree::insert(char* d) { tree_node* t = new tree_node; tree_node* parent; strcpy(t->data,d); t->left = NULL; t->right = NULL; parent = NULL; // is this a new tree? if(isEmpty()) root = t; else { //Note: …

Member Avatar for mitrmkar
0
104
Member Avatar for #define

hello everybody! i have given a question in which i was not allowed to use built-in 2d arrays of C++. I have to define my own class of 2d array in which both rows and columns were dynamically allocated. The hint given wast that "think in term of array of …

Member Avatar for Salem
0
55
Member Avatar for dls_20022002

i'm new to c++. i started with the following code and i have an, ISO C++ forbids comparison between pointer and integer ERROR. My my program is for a library. i am now trying to have it pull up my file and read then edit a bookfile. the area in …

Member Avatar for jonsca
0
621
Member Avatar for Jalwes

I am writing a program for class that I keep getting a segmentation fault on. I am fairly certain that it has to do with the assignment of the 'string location.' Could anyone possibly give me a hint as to what I'm doing wrong? I'm very new to this, I've …

Member Avatar for jonsca
0
126
Member Avatar for cj_in da house

I like most others am having trouble with the mode funtion i have some code that seems to be working so far. I can't get the last part of the loop and i came acroose this peice of code on the net. I don't know what it does exactly. Could …

Member Avatar for Ancient Dragon
0
25
Member Avatar for mmgoicochea

I have this code and Im getting two errors when debugging... Im trying to change it to arrange it but I think I have a major error.My "experience" in c++ is veeery basic this is my third week in college :( I need help please the errors are: >assignment5.obj : …

Member Avatar for mmgoicochea
0
112
Member Avatar for wale89

[QUOTE]This program actually have 4 function. 1)AddLast = to add a new node at the last of the list 2)FindNode = to find the desired node 3)DeleteNode = to delete the desired node 4)DisplayNode = display the list Now..my problems is with the AddLast function.. Before this I done with …

Member Avatar for wale89
0
183
Member Avatar for clutchkiller

Do any of you guys know if Winsock is a popular API that is used for companies hiring programmers? Thanks

Member Avatar for clutchkiller
0
76
Member Avatar for faaz

I have this homework assignment that i need help with and below is the code that i have so far. any help would be appreciated. thank you. Write a program that tells what coins to give out for any amount of change from 1 cent to 99 cents. For example, …

Member Avatar for restrictment
0
1K
Member Avatar for james_bond007

Hi. Let me start off by saying I've done no programming in my life aside from the 2 weeks of Intro to C++ class I've had so far, so I've got little idea of what I'm doing. Our assignment is to write a program for the 'game of NIM', essentially. …

Member Avatar for WaltP
0
2K
Member Avatar for ace8957

Hi everyone I am trying to write a program that will allow to people to play tic tac toe. My constraints are that this must be accomplished mainly through the use of functions and that the default cell field for the displayed game board must be stars. I am having …

Member Avatar for ace8957
0
3K
Member Avatar for babyd_

I am new at programming and got an assignment that is due tomorrow. I have to develop a program that calculates pay and bonus for three sets of workers. HELP!!!

Member Avatar for jonsca
0
97
Member Avatar for mswezey

Hello. Just need some advice on what I'm doing wrong with my code down below. I'm suppose to right up a program that reads in maze code that looks like this " 2 3swensw 2 1" for example. the first two digits = row & columns of the array while …

Member Avatar for WaltP
0
155
Member Avatar for dude1

i need to make a program that reads in a file and list things like the number of characters,words lines spaces tabs etc. anyone know the best way to do this? any help anyone can provide is appreciated thanks

Member Avatar for WaltP
0
97
Member Avatar for kavithabhaskar

Hi I am trying to count the number of words in a file and this is what i have so far. I am not sure about the getchar().. could you please tell me what i should be doing ? [code] #include<iostream> #include<fstream> #include<string> #include<conio.h> using namespace std; int main() { …

Member Avatar for necrolin
0
265
Member Avatar for caribedude

Hi, I seem to be getting myself into a lot of segmentation fault errors lately. The that currently has me stuck is one that shows up after I exit my program (an SDL App). When I need to debug I usually use the debugger or a Logger class I found …

Member Avatar for caribedude
0
246
Member Avatar for amia

write a c program that finds the smallest number among the five integers inputted by the user with the given sample output: Enter first number:20 Enter second number:3 Enter third number:18 Enter fourth number:100 Enter fifth number:7 The smallest number is 3...

Member Avatar for jonsca
0
44
Member Avatar for faaz

I have this homework assignment that i need help with and below is the code that i have so far. any help would be appreciated. thank you. Write a program that tells what coins to give out for any amount of change from 1 cent to 99 cents. For example, …

Member Avatar for restrictment
0
770
Member Avatar for karolik

So I'm trying to find a way to basically generate 100 numbers from 0 to 99 in random order with no duplicates. This is my code, and as you can see it displays 100 numbers but....some are duplicates. [CODE] srand((unsigned)time(0)); for (int count = 0; count < 100; count++) { …

Member Avatar for jonsca
0
114
Member Avatar for PDB1982

I am trying to start the odometer reading at 0 to start with, but I want it to increase everytime the user inputs MilesDriven. I can't seem to get it to work...any ideas? [code] //Paul Baker //TRCC Intermediate C++ //Assignment 3, Odometer #include <iostream> using namespace std; class Odometer { …

Member Avatar for PDB1982
0
91
Member Avatar for clutchkiller

[code] #include <iostream> using namespace std; class A { private: int a; }; A::A() { a = 10; } int main() { A obj1; cin.ignore(); cin.get(); } [/code] It is giving me the error Error 1 error C2600: 'A::A' : cannot define a compiler-generated special member function (must be declared …

Member Avatar for mrnutty
0
140
Member Avatar for suncica2222

[CODE] _CreateProcess __CreateProcess = NULL; __CreateProcess = (_CreateProcess)GetProcAddress(GetModuleHandle("Kernel32.dll"), "CreateProcessA"); [/CODE] what is this (_CreateProcess) in the code??? is this a cast types? __CreateProcess = [B][COLOR="Red"](_CreateProcess)[/COLOR][/B]GetProcAddress(GetModuleHandle("Kernel32.dll"), "CreateProcessA");

Member Avatar for WaltP
0
88
Member Avatar for atticusr5

hey everyone so for my class in c++ we were asked to implement a linked list in an old program. in the old code i had two classes, and the point of the new code was to take the old code and implement a linked list. I honestly have no …

0
52
Member Avatar for cj_in da house

can anyone explain what this part of the for loop is doing? [code] int findMode(int *array, int size) { int mode = -1, position = 0, highest; int frequency[constant]; for(int i = 0; i < size; i++) //initailize all frequencies to 0 *(frequency + i) = 0; for (int k …

0
40
Member Avatar for Martje

Hi all, I am trying to write a string to a multiline textbox but apearently my code doesnt do as i want... This is the code i am using : [CODE]textBox9>Lines[0]="Succes";[/CODE] But when the code executes nothing happens in the textbox, everything just stays thesame :S Am i doing something …

Member Avatar for Martje
0
428
Member Avatar for minnu09

HI, i was trying to develop a project in VC++. I am having my source code(my *.cpp and *.rc files) in a directory called "srce" and the header files in a directory "inc" and the resources in "res". now when im trying to compile the project its giving me an …

0
39
Member Avatar for Kakespade

I've just started learning C++, and I'm having some problems running my programs. Even when I just copy the source code from my C++ tutorial book: [CODE]//----------------------------------------------------- // // add.cpp // // Program for adding two whole numbers // #include <iostream> using namespace std; int main () { int number1; …

Member Avatar for NathanOliver
1
138
Member Avatar for Dyed Purple

Hiya. I'm a complete C++ noob. I'm trying to make a bingo game where the computer gives the user eight numbers and the user slowly plays a game of bingo. It's very much work in progress. However, I'm having a problem when trying to compile it, the program seems to …

Member Avatar for Dyed Purple
0
124

The End.