49,761 Topics

Member Avatar for
Member Avatar for Krammig

Thanks for reading. I installed VS2010 after a drive crash, prior I had VS2005 and everything was fine. Now on compiling a C++ app that was fine previously I am seeing a couple of errors which I just cannot figure out. Error 1 error C1189: #error : This file requires …

Member Avatar for Krammig
0
376
Member Avatar for cafegeo

I have two functions. One is supposed to fill in an array, and the other takes that new array, finds the lowest number in that array, and prints the subscript. int getNumAccidents(int acc[], const int size); [B]Fills array num_acc[][/B] int findLowest(int acc[], const int size); [B]Takes num_acc[], finds lowest value …

Member Avatar for cafegeo
0
237
Member Avatar for Loki55

This is an assignment that I'm having trouble with, these are the 2 questions I'm having trouble with. 2. Write a loop that counts only the odd numbers out of the first five numbers entered from the keyboard, but does not count (skips) the number 7. Use the keyword continue …

Member Avatar for mike_2000_17
0
111
Member Avatar for chocl8drop

I am trying to write a C++ program that will list the perfect numbers between 1 and 1000. I also have to print the divisors to confirm the number is perfect. I started by trying to find the perfect numbers. Here is my code. Please help. #include <iostream> using std::cout; …

Member Avatar for sundas0068
0
629
Member Avatar for sahasrara

Dear all this program create a linked list of numbers while you dont enter 0. then bubble sort function is called and finally display function shows sorted list. I wrote it by Borland 5.02 . Have a good time!

Member Avatar for mike_2000_17
0
214
Member Avatar for sms5660

I have to write this code for my homework assignment. I am in an introductory C++ class, VERY introductory. We had to write a blackjack game, but follow the book at the same time, I know there are many easier ways to do the things my code says, but we …

Member Avatar for sms5660
0
218
Member Avatar for Labdabeta

I have a problem that I am having trouble solving. I have a string of undefined length containing '0' or '1'. I need to convert this string to decimal... but I CANNOT store it in anything but another string. My issue is how to do this?! I have been thinking …

Member Avatar for nezachem
0
151
Member Avatar for jmcginny5

Here is the prompt of what I have to do: Overview In this assignment, implement a class called Complex, which will be used to represent a complex number. A complex number is one that is comprised of a real part and an imaginary part. It is typically represented in the …

Member Avatar for jmcginny5
0
2K
Member Avatar for Sahilroy

I was given an assignment to complete on database, i have created on but crashes after executing once, check it friends and please help, if you can modify or make it way, i'll be graceful. Please find the coding in attachment section. thanks hope will get good response

Member Avatar for mike_2000_17
-3
150
Member Avatar for jay200032

Hi Everyone, I want to seek advice on how to acquire to strong background in Client-Server Programming, i mean learn it from scratch since having no knowledge about it but with networks Thanks

Member Avatar for \007
0
190
Member Avatar for denkfix

Hi, I use the stl features to deal with string conversions, especially facets. Now, I am faced with the task to lower a string except its first letter. Please note that I am dealing with multi-byte characters and so I cannot simply replace the first character of the string with …

Member Avatar for denkfix
0
222
Member Avatar for SOME one2020

i have write that code i m new in programming this code doesnt work in one source file but when i type exact same in other file it start working [CODE]#include <iostream.h> main() { char std1[20], std2[20] cout << "enter your name student"<<"\n"; cin >> std1; cout << "enter your …

Member Avatar for SOME one2020
0
85
Member Avatar for tonysun

Hi, I'm trying to link c object with c++ (using QT Library) object and find the following error. tonysun:~/tmp# g++ -c main.cpp tonysun:~/tmp# gcc -c mainlib.c tonysun:~/tmp# g++ -o main main.o mainlib.o [ICODE]main.cpp:(.text+0x64): undefined reference to `para_prep()'[/ICODE] <<main.cpp>> [CODE]#include "mainlib.h" int main(int argc, char *argv[]) { para_prep(); /* Here are …

Member Avatar for tonysun
0
4K
Member Avatar for ankitkshah

Hi all, I have some code as following. BOOL qw = ExtractResource(AfxGetResourceHandle(), IDR_DLL1, _T("C:\\VBDLL.dll") ); bool ExtractResource(const HINSTANCE hInstance, WORD resourceID, LPCTSTR szOutputFilename) { /*LPTSTR sArgv = argv[1]; LPTSTR sArgv2 = argv[2];*/ TCHAR sResName[5] = _T("#101"); TCHAR sRestype[4] = _T("DLL"); HRSRC hres = FindResource(AfxGetResourceHandle(), sResName,sRestype); if (hres == 0) { …

Member Avatar for ankitkshah
0
255
Member Avatar for ankitkshah

Hi.. I am working with vb.net .. I am new in vc++. I need to write some code in vc++ in some case. I need vc++ for following reason. I created one dll in vb.net and make a tlb file based on vb.net dll. I import physical tlb file in …

Member Avatar for ankitkshah
0
283
Member Avatar for yongj

So with my program I'm trying to count the number of operations it takes to perform a insertion sort/quick sort. And because functions are calling other functions from inherited classes, it gets a bit confusing as to where I can place the operation to increment the number of operations. Right …

Member Avatar for mitrmkar
0
262
Member Avatar for zachcoenen4

I have been trying for about 6 hours to get this program to work. It's a C++ program for for loops. I am trying to go through a book, but I don't have source code for how this should be. I need to make a program that looks like this …

Member Avatar for zeeshan soomro
0
468
Member Avatar for jmcginny5

I have this code written. One of the problems that I am having is in "Test 6". It should be totaling to $1.11 but it is totaling to $1.8 because it is switching the 6 and 3 and I cant figure out why. Another problem is that for some of …

0
88
Member Avatar for Khoanyneosr

So i need to find a way to prompt the user for an answer (cin) while a timer is running. Like if the user doesn't answer in time then... or after a certain period of time passes an event occurs. Please Tell me if i'm being too vague. Thanks

Member Avatar for triumphost
0
84
Member Avatar for jimmymack

[CODE]// test.cpp - Script 6.7 #include <iostream> // Function prototype. // Function takes two arguements. // Function returns no values. void changeVar(int *myVar, int newValue); int main() { // Create a new variable. int myNum = 20; // Print its current value. std::cout << "myNum is " << myNum << …

Member Avatar for jimmymack
0
165
Member Avatar for chintan_1671

I am creating a Win32 Dll Wrapper around my C# class library. I am able to pass string from my C# to C++ application. But i am not sure as to how can i pass string array in Win32 C++ project. [CODE] //C# code void Test(string lFile, int ver); //C++ …

Member Avatar for Ancient Dragon
0
436
Member Avatar for eman 22

How can i get th execution time ?? I tried to use library <time.h> [CODE] clock_t tStart = clock(); //put here my code double executionTime=(clock() - tStart)/CLOCKS_PER_SEC; [/CODE] here the excution time always zero. so what's the error here??

Member Avatar for eman 22
0
185
Member Avatar for L0s3r

[CODE]int main() { FILE *fp; unsigned long size; unsigned char *loc; fp=fopen("Hello.exe","rb"); if(fp==NULL) { printf("\nCouldn't load file"); getchar(); return 0; } fseek(fp,0,SEEK_END); size = ftell(fp); fseek(fp,0,SEEK_SET); loc=(unsigned char*)malloc(sizeof(size)); printf("\nSize of file is : %d",size); if(loc==NULL){ printf("\nError in allocating memory."); } printf("\nFread called"); fread(loc,size,1,fp); printf("\nFread fails:"); return 0; } [/CODE] I …

Member Avatar for nezachem
0
186
Member Avatar for Shruti4444

I have a text file for example abc, cde,fgh, jkl, rty qwe,erty, tyujk,werty , lkjh I want to read these tokens from the text file, into different variables row wise (ie one row at at time) Number of tokens in a row is fixed. (ie 5 in this case) Please …

Member Avatar for sfuo
0
170
Member Avatar for dyingatmidnight

Hello, I haven't done any work with reading or writing from/to files in C++, I think we did some C in school but its all a little fuzzy at this point. What I need to do is store the values for a couple different functions in a text file, have …

Member Avatar for VernonDozier
0
167
Member Avatar for mbouster

Hi guys, I need to implement a program for simulating the flooting algorithm. Can someone suggest from where to start. I will use structs or classes? How the flow of the program will be?

Member Avatar for mbouster
0
2K
Member Avatar for eman 22

is there a way to convert from pointer array to array I tried the following, but it doesn't work. [CODE] int[]a={1,2,3}; int* p; p=a; a=(*P);// doesn't work [/CODE]

Member Avatar for mike_2000_17
0
85
Member Avatar for choboja621

I`m new in Programming stuffs. So here is my codes: [CODE]#include<iostream.h> #include<conio.h> float records[5][5]; float ave; int ctrX, ctrY; main() { clrscr(); ctrY=0; for(ctrX=0;ctrX<=4;ctrX++) { cout<<"Student Number: "; cin>>records[ctrX][ctrY]; ctrY++; do { cout<<"Quiz 1 Score: "; cin>>records[ctrX][ctrY]; if ((records[ctrX][ctrY]<0)||(records[ctrX][ctrY]>30)) { cout<<"The score supplied must be from 0 to 30 only!" …

Member Avatar for Moschops
0
96
Member Avatar for atticusr5

Hello all, So I am just playing around with different ways to format output to the command line in c++. I already found information on how to change the color of standard output (both in Linux and Windows). Is there a way to highlight output to the command line? I …

Member Avatar for L7Sqr
0
59
Member Avatar for jeffpro

Hello again guys, I've got kind of a noob question. I have a wchar[260] and I need to compare it with a char* and im getting the error error C2664: '_stricmp' : cannot convert parameter 1 from 'WCHAR [260]' to 'const char *' Thanks!

Member Avatar for Narue
0
118

The End.