49,756 Topics

Member Avatar for
Member Avatar for power_computer

For the life of me I cant figure out this simple task I know with a static array you just simple shift over one element and decrease the size in variable pertaining the length of the array as such [code] for(i = 0; i < n; i++) if(key == array[i]) …

Member Avatar for power_computer
0
3K
Member Avatar for ge6a93

When I use OnTimer() in Visual C++ 6.0 using MFC Library the application screen starts blinking(flashing). Is there any solution about this problem? Thanks.

Member Avatar for ge6a93
0
104
Member Avatar for power_computer

I have a linked list containing the following data struct node { string name; int hours; node* next; } I have all function I've made so far working, adding indiviual node, deleting node, printing data in nodes, Ive made the program to read from a file upon execution to create …

Member Avatar for power_computer
2
1K
Member Avatar for godsgift2dagame

Hey guys, I'm struggling with yet another problem. The goal is to run 1000 "draws" of three numbers but the catch is, the three numbers can't be repeating. So, no 4 1 4 or 7 7 7 or 8 1 8 and so on and so forth. Every line of …

Member Avatar for godsgift2dagame
0
99
Member Avatar for richman0829

Hi - I'm having a problem converting a couple of things that work fine spelled out in function main, but not when I try to define them as functions. One is a process of filling in a one-dimensional array. I'd like to just be able to say "here's the array; …

Member Avatar for richman0829
0
149
Member Avatar for Deadmon

Hello all, I have a small question here. Let's say I want to tokenize a string(or multiple strings) from input. For example, my input file has the following: 1 2 3 And this is my tokenizing code: [CODE] char line[256]; vector < char *>tokenize(FILE * in) { vector <char*>tlist; char* …

0
56
Member Avatar for debasishgang7

hi. i have a very basic problem in c++.. i use Microsoft visual c++ 2008. in many prog code i can see that there are many header file which are not included in MSVC++ library. and obviously error ocr. how can i get these library(.h) files and how to install …

1
79
Member Avatar for Icebone1000

First..Im very beginner with winsock and network programing.. Im doing a simple app that can act or as server or as client. What Im doing is that I open the app twice in the same computer, in one I choose server, and in the other client. With the server part, …

Member Avatar for lashatt2
0
820
Member Avatar for hla3mi

[CODE]#include <iostream> #include <string> using namespace std; struct Employee { //Data string name; int id; string residance; int salary; }; class Node { public: // Data Employee data; // The Next Pointer Node * next; // Constructor Node(Employee Object ,Node * ptr = NULL ); }; class List { int …

Member Avatar for hla3mi
0
181
Member Avatar for anurag814

i want to know the programming code which converts roman numerals to integer numerals.

Member Avatar for VernonDozier
0
47
Member Avatar for Wong23

I am given the class definition of stack and queue classes where I have to write a templated function called reverseQueue(?) that takes a pointer to queue as a parameter and uses stack object to reverse the given queue. The function call to reverseQueue should reverse the data of the …

2
226
Member Avatar for number87

hi I wanna find out the number of integers from an input number. For example if i enter 84075, the output should be 5. this is what i came up with.....im new to c++ still>.< [code=cpp]#include <iostream> using namespace std; int main() { int numCount, number; bool integer; cout << …

Member Avatar for taepodong1101
0
198
Member Avatar for mevkurray

hi all using ubuntu here, and the default setup (straight from synaptic) of wxwidgets has the wxDB classes disabled. so, how does one rebuild the actual libraries of wxwigets, once ive edited the setup.h files. and which setup.h files do i need to edit. i found what i was looking …

Member Avatar for mevkurray
0
189
Member Avatar for thelamb

Hello all, I have a VB.net application and a C++ DLL. The C++ DLL has an exported function that gets called by the VB.net application. The C++ exported function is as following: [CODE=cpp] STARTUPINFO si; PROCESS_INFORMATION pi; ZeroMemory( &si, sizeof(si) ); si.cb = sizeof(si); ZeroMemory( &pi, sizeof(pi) ); TR::Log( "Starting …

Member Avatar for thelamb
0
2K
Member Avatar for red999

So I am creating a program for a class that reads in from a file the appointments. The file has this format Date,Subject,Start Time,End Time,Location,, The interesting thing about the file is that it does not contain the same appointment (same name, location, and time) more than once. For example: …

Member Avatar for red999
1
97
Member Avatar for jonathanYoung

hello; i've been programming with c++ for about 2 months, BRAND new at this, im currently making a text based RPG for one of my programming classes. im having trouble with a error that comes up, and no one in my class can find out what exactly is the problem... …

Member Avatar for jonathanYoung
0
104
Member Avatar for Ashishinani1756

Print all the pairs of prime numbers which is equal to the sum of the given no. entered by user.

Member Avatar for donaldw
0
90
Member Avatar for Lukezzz

I am looking for a way to find the first occurence of: " " when searching backwards in String1 with beginning at index where # was found. However with LastIndexOf, this will find the Last occurence of " ". How can I find the first occurence of " " wich …

Member Avatar for thines01
0
120
Member Avatar for wyett

So, I'm working on a fraction calculator to add, subtract, divide and multiply. Currently on the part where it's asking for the user to input their fractions. My professor states this on the assignment sheet: "A valid sign will be ‘+’ or '-', a valid whole part or numerator will …

Member Avatar for jonsca
0
89
Member Avatar for combustion

Hello, I'm new to c++ and I am trying to convert a bruteforce program from Python to c++. Here is what I have so far: [CODE=c++] #include <iostream> #include <string> using namespace std; char chars[]={'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'}; string t; cout << "Enter a string: " << endl; cin >> t; void checkPassword(string …

Member Avatar for Ancient Dragon
0
258
Member Avatar for hmpargi

/* What: Instant Insanity Game source in Turbo C. GPL(C) ======================= Col1 Col4*4 3 3 3 3 Row1 405 405 405 405 Row2 1 1 1 1 Row3 2 2 2 2 Row4 ======================= c:\mosh\games>tcc -If:\tcc30\include -Lf:\tcc30\lib instanti.cpp */ #include "cubeinit.cpp" int cube[4][6]; /* four cubes with six faces */ …

-2
70
Member Avatar for whouton

Hi guys, I'm trying to make a function that allows the user to enter in a file name and access that file; if the file name is wrong or the file is not there, I want to allow the user to enter in another file name. For some reason the …

0
75
Member Avatar for Philly0494

Okay, so I have to execute a batch command on a restricted user's account, however the batch command will not work unless the process has Administrative Privileges. currently i call the batch command via [CODE]system("command here");[/CODE] I, as the programmer, know the Administrator user/password on the WinXP machine this is …

Member Avatar for Ancient Dragon
1
104
Member Avatar for Fujy

I`ve been programming in Java, and started learning C++ a few days ago. I was playing around with codes and got this : [CODE] # include <iostream> using namespace std; int main(){ char str[100]; char *pnt[100]; for(int x = 0; x <= 100; x++){ pnt[x] = str[x]; } read(); } …

Member Avatar for thines01
0
355
Member Avatar for fiaz ranjha

class Account { protected: char* Account_Holder; int Amount; public: Account(); Account( char* Holder, int Num ); Account( Account &obj ); }; Account::Account() { Account_Holder = NULL; Amount = 0; } Account::Account( char* Holder, int Num ) { Account_Holder = Holder; Amount = Num; } Account::Account( Account &obj ) { Account_Holder …

Member Avatar for thines01
0
90
Member Avatar for BeyondTheEye

[I]Assignment:[/I] Write a function zet_om_naar_getal(getal) that calculates the binary representation from a decimal number as a string, using recursion. [I]What I have so far:[/I] [CODE=CPLUSPLUS]string zet_om_naar_binair(double getal) { string binair; if(getal >= 1) { binair += '0' + static_cast<int>(getal)%2; binair += zet_om_naar_binair(getal/2); } else if(getal > 0) { double dubbel …

Member Avatar for thines01
0
120
Member Avatar for Ragoune

Hi, As I'm new to C++, but not to programming, I tried to start simple by reading off value from the registry. I'm talking about standard values such as the processor's name. I made a little function which checked how many processors the user has, that works fine. But I …

Member Avatar for Ragoune
0
3K
Member Avatar for kernel>panic

Hi, I have been trying to figure this out: How do you remove more than one thing like this remove("C:/Users/"+name+"/Documents/help"); How I want it to work is the users specify's there user name and then it opens the C drive>Users>Then it needs to add the input user name. Thanks.

Member Avatar for thines01
0
120
Member Avatar for paruse
Member Avatar for thines01
0
204
Member Avatar for Carrots

Hi, I have wrote a program which stores values in a .csv file. He is the how the data is stored in the .csv file: [quote] "Steve","21 Main Street, Nottingham","SW1 1AB","0115 9123456","These are some details. and, so.","112233","1359" "David Baner","123 Shaw street, Nottingham","NG92HJ","020 123456","ifbiugbuige","112233","1200" [/quote] Each line forms a single object. …

Member Avatar for Ancient Dragon
0
156

The End.