48,986 Topics

Member Avatar for
Member Avatar for bejfake

Hi, I need to implement list based on dynamic arrays (second task is to implement as double linked list). Both tasks are done, but I have problem with time limit on test platform when values are millionths. I suppose that resizing dynamic array is delaying so much. I have implemented …

Member Avatar for rubberman
0
994
Member Avatar for noor.ulhuda.372

hi.i am new to c++.i need to make hangman game for university project.could some on tell me what is the problem with this part of the code?thanks in advance #include <iostream> #include <iomanip> #include <cstdlib> #include <ctime> #include <string> #include <windows.h> using namespace std; int main() { //variable declaration string …

Member Avatar for StuXYZ
0
193
Member Avatar for programmerUSM

hello.. i need to develop an application form which will be used nationwide.once user complete fill in the form,reference number will appear.So i need to create reference number,there is no specific digit required as long as it is unique number/combination.can anyone teach me how to create the reference number? is …

Member Avatar for programmerUSM
0
184
Member Avatar for chubbyy.putto

I dont know what is wrong. The output didnt show anythin. FYI I have p6.dat on same dic. it just the out put didnt print the number. #include <iostream> #include <fstream> using namespace std; const int mySize = 15; const int myStop = 3; void impliedTask(int *&,float *&); int main …

Member Avatar for Ancient Dragon
0
174
Member Avatar for newbiewwcode

Member Access Operators: . and -> http://msdn.microsoft.com/en-us/library/b930c881.aspx I read the above article and played around with some codes. I thought line 25 and 26 would work but they didn't. Can you guys please tell me why? Thanks for helping! #include <iostream> using namespace std; class State { private: int* state; …

Member Avatar for newbiewwcode
0
200
Member Avatar for costigan555

I am having a little bit of trouble finishing a project I have made for myself. Also, before we begin, it is important to note I don't have much experience with C++ programming and programming in general. I realize my code is probably not the most efficient or even elegant. …

Member Avatar for iamthwee
0
361
Member Avatar for bushra mahboob

You are required to write a C++ program using loop and switch statement. The program should display even or odd numbers from 1 to 50 depending upon the option given by the user.

Member Avatar for iamthwee
0
102
Member Avatar for Alxprog

Wikipedia page on DVDVideoSoft says it's written in C++ Qt and C#. So my question is this : in particular regarding the above mentioned product and in general what's written (or should be written) in C++Qt and what in C#?

Member Avatar for Alxprog
0
637
Member Avatar for l3the

Hello to all programmers. I have joined this forum newly I decided to learn c++. Is there any video tutorial source for beginners that you know ? Thanks for your help

Member Avatar for Suzie999
0
294
Member Avatar for candyandy212
Member Avatar for bejfake

Hi, I have such simple structure in unmanaged C++: struct Cam { char ip[16]; char login[16]; char pass[16]; char name[16]; }; and C# marshalled structure: [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)] public struct Cam { [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 16)] public string ip; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 16)] public string login; …

Member Avatar for bejfake
0
2K
Member Avatar for Mhayt

Hello How to solve this ?I got mad because of this quation Write a menu driven application using C language that performs some searching and sorting operations. Your application should be able to perform linear and binary search. In addition, it can perform sorting using one of the sorting algorithms …

Member Avatar for pritaeas
0
151
Member Avatar for bejfake

Hi, I start with code: int main() { Dict d; int n; std::cin >> n; char word[100]; for (int i = 0; i < n; i++) { std::cin >> word; d.addWord(word); } d.addWord("dog"); d.addWord("drog"); .... return 0; } I don't know why when I call method addWord manually, i.e. calls …

Member Avatar for bejfake
0
231
Member Avatar for chubbyy.putto

I got an error: -Functions that differ only in their return type cannnot be overload (#8) -Implicit conversion loses integer precision: "time_t'(aka "lomg") to unsigned int (#14) -Implicit cnversion loses integer precision: long to int (#18) -Functions that differ only in their return type cannnot be overload (#24) #include <iostream> …

Member Avatar for chubbyy.putto
0
159
Member Avatar for Mhayt

Hello How to solve this ?I got mad because of this quation Write a menu driven application using C language that performs some searching and sorting operations. Your application should be able to perform linear and binary search. In addition, it can perform sorting using one of the sorting algorithms …

Member Avatar for Ancient Dragon
0
243
Member Avatar for Sarkurd

Hi i tried to do some training and write '==' operator to compare between two vectors but i got this error Error 1 error LNK2005: "bool __cdecl operator==(class vector,class vector)" (??8@YA_NVvector@@0@Z) already defined in Source.obj c:\Users\Sarbast\documents\visual studio 2013\Projects\Overloading Vector\Overloading Vector\Vector.obj Overloading Vector Vector.h #include <iostream> using namespace std; #ifndef VECTOR_H …

Member Avatar for Sarkurd
0
380
Member Avatar for basil60

Hi I'm a noob. Can anyone please explain why I get a "'ranum' was not declared in this scope" error in this script? I was obviously using Arduino. void setup() { pinMode(13, OUTPUT); pinMode(12, OUTPUT); pinMode(10, OUTPUT); pinMode(09, OUTPUT); double ranum = rand()%11; } void loop() { if (ranum==0){ digitalWrite(13, …

Member Avatar for richieking
0
2K
Member Avatar for trach

I have a project coming up Select a Theme and have 50 words associated with it Words must have a common theme - your choice Examples: Like Periodic Table Elements, or Sports teams, or Types of cars… Have one Term describing category you picked. This is the FACE term… Menu: …

Member Avatar for tinstaafl
0
451
Member Avatar for Vikram Sehgal

hello, so i am having some problem x = 50; y = 31; //declaration from line 1 to 5 lastx = x; lasty = y; while(1 == 1) { gotoxy(lastx, lasty); printf(" "); gotoxy(x,y); printf("**|_A_|**"); a = getch(); lastx = x; lasty = y; if (a == 77) x = …

Member Avatar for Suzie999
0
223
Member Avatar for bc230201818

Having a problem with the link list program . have failed to resolve.worked over 12 hours but the solution looks pretty disorganised an incoplete, please advise thanksInline Code Example Here ` #include <iostream>` #include <stdlib.h> #include<list> using namespace std; class Node { public: int get() { return object; }; void …

Member Avatar for bc230201818
0
272
Member Avatar for ashley.vanhoesen.7

My data is going in to the queue just fine, but when I go to print the data nothing happens. How do I pull the data from the priority queue heap to print? NOTE: The heap implementation cannot be altered. /** ADT priority queue: Heap-based implementation. Listing 17-3. @file Heap_PriorityQueue.h …

Member Avatar for triumphost
0
500
Member Avatar for cambalinho

- the GetWindowRect() give me the window size and position; - the GetClientRect() give me the window size without inclued the scrollbars\menus\borders\others; so when 1 image is more big than client size, what size i can use? DC size? and if a child window position is more big than client …

Member Avatar for cambalinho
0
352
Member Avatar for DS9596

* I have to make a maze with 21 rows and 77 columns, allow some for the user's input and for messages. * It also has to have A multidimensional array containing the board. * A function to print the board. * Find the user's starting location (i.e. the location …

Member Avatar for DS9596
0
765
Member Avatar for smitsky

Hi. I want to output all of the processes in the printer queue here, and I'm not able to figure out quite how to do that. The only process that shows up is the last one I entered. For instance, if I put a process into printer queue 1 and …

0
122
Member Avatar for umaradam

write c++ program to find sum,sub,mult,div by using function the user will input two number by keyboard

Member Avatar for Ancient Dragon
0
110
Member Avatar for Jsplinter

I have a container object which contains float*. struct MyCon{ MyCon(){ matA = new float[10]; matB = new float[10]; } float *matA; float *matB; } And, I am storing pointers to MyCon objects in a std::map. map<string, MyCon*> myCon_map; myCon_map.insert(pair<string,MyCon*>(string("str"), new MyCon())); Once I am finished with myCon_map, how do …

Member Avatar for JasonHippy
0
593
Member Avatar for rashad fares

i need answer for this Q is that how we can write program in C++ to eccept any number and print it with its digit? and thanx^^

Member Avatar for Ancient Dragon
0
151
Member Avatar for beastie805

really need help figuring out this program, it crashes during the getdata() function in main any tips or suggestions appreciated thank you #include<iostream> #include<string> #include<cstdlib> #include<iomanip> #include<fstream> using namespace std; struct StudentData { string Name; int Idnum; int* Tests; int* TestNo; double Average; char Grade; }; void ReadHeader(int&, ifstream&); StudentData* …

Member Avatar for Ancient Dragon
0
189
Member Avatar for glao

Hello , I can't figure how to properly measure time execution when I have 2 loops and I want to measure the time for the innermost loop: for (int i = 1; i <= N; i++) { ..... clock_t begin = clock(); for (int j =1; j<= M; j++){ //want …

Member Avatar for Suzie999
0
453
Member Avatar for cambalinho

by the book, i read that with WM_SIZE message i can get the client size instead use the GetClientRect() function: case WM_SIZE: GetClientRect (hwnd, &rect) ; VerticalScrollSize=rect.bottom; si.cbSize = sizeof(si); si.fMask = SIF_ALL; GetScrollInfo (hwnd, SB_VERT, &si); si.nMin = 0; si.nPos = VerticalScroll; si.nMax = VerticalScrollSize-2; si.nPage=2; SetScrollInfo (hwnd, SB_VERT, …

Member Avatar for cambalinho
0
237

The End.