51,593 Topics

Member Avatar for
Member Avatar for crownedzero

I figured this would be easy but ultimately I can't seem to get past the " " in a char array. i.e. [CODE] const int ARRAY_SIZE = 80; char charArray[ARRAY_SIZE]; cout << "input a sentence"; cin >> charArray; [/CODE] "This is a test string" returns only "This" as the space …

Member Avatar for vidit_X
0
8K
Member Avatar for berwick53

Hi I currently have a winform inside a MDI like the one in the picture to the left, how can I get it so that it looks like the one on the right with all the bars and icons removed [URL=http://imgur.com/F134B][IMG]http://i.imgur.com/F134B.png[/IMG][/URL] cheers sam

Member Avatar for mazzica1
0
76
Member Avatar for Cainer

Hi, I am using WinSock library for sending data over network, and I have a problem. I know how to send data in one struct and receive it on the other side, because there is constant size of structure. But what if I have more structures, each one with different …

Member Avatar for Cainer
0
563
Member Avatar for myrongainz

I'm trying to reverse a string in pairs Example: input - heaven output - ne va eh My code seems to be right until the last for loop... That's where I need help Here's my code: [CODE]#include <iostream> #include <string> using namespace std; string revString(string user); int main() { string …

Member Avatar for stereomatching
0
368
Member Avatar for Powerponken

Hi, I have received an application that stores some properties in a file. The existing struct looks like this: [CODE] struct TData { UINT uSizeIncludingStrings; // copy of Telnet data struct UINT uSize; // basic properties: TCHAR szHost[MAXHOSTLEN]; //defined in Sshconfig UINT iPortNr; TCHAR szTermType[MAXTERMTYPE]; // login properties: BOOL bTelnetLogin; …

0
71
Member Avatar for stereomatching

Is it really hard to find someone who know how to make a good use of stl and combined the power of GP and OOP?Like the way modern c++ design did? There are so many people say these kind of techniques are unrealistic because there are only a few of …

Member Avatar for vijayan121
0
259
Member Avatar for chiiqui

I just wanted to know what famous algorithms that you should have in hand? or be familiar with? or That is always used?

Member Avatar for JeffGrigg
0
235
Member Avatar for c++_fem

Hi, Does anyone know how to animate object so it follows a previously drawn spline? I tried by translating all object vertices by Spline_point[i]-Spline_point[i-1] by frames but this doesn't work. Does anyone have a better idea?

Member Avatar for c++_fem
0
107
Member Avatar for yurigagarin

I have a bunch of floats and I need to convert them to string to use Send command to send to a Receiver. However, I been trying to code like below where long1deg is a float. [ICODE] char long1degC = long1deg; [/ICODE] Or [ICODE] char* long1degC = new char[30]; float …

Member Avatar for yurigagarin
0
213
Member Avatar for brainfo

I dont know wats wrong with my code but what am trying to do is for salary its an addition of DA and HRA. Here is my code.[CODE]#include <iostream.h> class teacher{ private: char name[20]; char subject[10]; float DA , HRA ; float salary; public: void getdata(); void display(); int payrol(); …

Member Avatar for brainfo
0
104
Member Avatar for itai.dee
Member Avatar for Narue
0
68
Member Avatar for FEC

I have this program to write that Generate 100 lowercase letters randomly and assign to an array of characters (Chars[ ] ). Count the occurrence of each letter in the array and save them in counts[ ]. Write a main function to test the different count. What i don't know …

Member Avatar for Narue
0
117
Member Avatar for phfilly

Hi All! I've got a weird problem here...It doesn't want to add my int values to a char array even though I static_cast the value to char. If you could just look at my code please! [CODE]void AltBoolean::print(){ perma = new char[arraySize]; int temp; int counter = 1; for(int i …

Member Avatar for Ancient Dragon
0
363
Member Avatar for nchy13

i am working with g++ in linux ubuntu i am attaching input file for which error occurred. this file tries to insert 1000 numbers and then 250th smallest number. this code worked well when i inserted less numbers but it is not working for insertion of 1000 numbers. compiler shows …

Member Avatar for nchy13
0
175
Member Avatar for Cross213

What's wrong with this code because I'm getting errors but everything looks fine though.

Member Avatar for Cross213
0
98
Member Avatar for vergil1983

Hi all, just a curious question... Why pointers are used in C++ or other languages in order to produce a much higher "quality" code and in open source programming???

Member Avatar for MonsieurPointer
0
128
Member Avatar for dkXIII

I have received cipher documents which are believed to be secret messages. So, my mission is to break the encoding and reveal what the secrets are that each file contains. However,it is believed that each file contains a message protected with a "null cipher" which surround the real characters in …

Member Avatar for raptr_dflo
0
194
Member Avatar for fatzky_04

Hello! Can you please help me understand these problem. I don't have any idea what is the supposed output. Given a matrix M stored in array m[10][10]. Check if M is lower triangular, i.e. every element below the main diagonal is zero.

Member Avatar for StuXYZ
0
93
Member Avatar for _electricblue

#include <iostream> #include <fstream> #include <cstdlib> using namespace std; const int numRows = 22; // Number of rows in the board const int numColumns = 80; // Number of columns in the board int row; int column; char Drawing[numRows][numColumns]; // environment representing all the cells and their state. char point[6]; …

Member Avatar for mazzica1
0
876
Member Avatar for truss86

Hello! I am working a programming assignment and the goal is to turn the static arrays into dynamic arrays. The program reads in a file of names, votes and outputs the winner and number of votes. I have the first dynamic array for votes complete, but I am having trouble …

Member Avatar for mazzica1
0
179
Member Avatar for dakerao

Hello this is my problem below How would i do this: Got a text file called directorycontents.txt in this directorycontents.txt there is a bunch of text each one is a filename with a filename extension i want to be able to go like this if there is a filename extension …

Member Avatar for WaltP
0
193
Member Avatar for nchy13

hi all!! i wanted to know the name of book which covers all the basic syntax and concepts of java keeping in mind that i have the basics of c++.

Member Avatar for stevanity
0
118
Member Avatar for physicsg

Hey. I have just joined and my skills in C++ are more or less no existen but still better than me trying to learn python or smth which supposedly is more adequate for the task as i am told. Any way I have a data file which consits of observational …

0
45
Member Avatar for rrr12345

Hello, I have made a store inventory system in console in C++. I would like to know how can i convert it into full fledged graphical user interface. Any article,book,tutorial,video would be very helpful Thank you.

Member Avatar for rrr12345
0
227
Member Avatar for DeusManP0W

My problem is as said "expected ';' before "int" " I dont the problem => This obviusly aint the hole text, rather its the place where its complaining. [CODE]int tarning2(void) { return(tarning1()+tarning1()); } int tarning1(void) { int max = 6, min = 1; return (rand()%(max-min+1)+min); }[/CODE] This might have something …

Member Avatar for DeusManP0W
0
1K
Member Avatar for salah_saleh

Hi!, I have a text file that contains a 2 dimensional matrix, and I will have to deal with many different files with different matrix dimensions, so I decided to use vector of vectors as they double their size automatically. the problem is that I don't know how to get …

Member Avatar for salah_saleh
0
6K
Member Avatar for jdm

I'm working on a program that lets the user draw squares or circles in any size (as long as it fits the window) and in a selection of color. I want to limit the number of objects that the user can draw to 10 and be able to select, move, …

0
70
Member Avatar for nchy13

don't go by the size of code. [U]before inserting search function my code was working fine with insert function. but don't know what is wrong with search fn. or declaration of variables in main().[/U] [B]this is what compiler shows. tree.cpp:316:15: error: cannot convert ‘int*’ to ‘redblacktree<int>*’ in assignment tree.cpp:318:15: error: …

Member Avatar for nchy13
0
165
Member Avatar for dospy

t to do something like [code] void f1(int a[][]) {//do smth } //and call the function like this F1({{1,0},{2,5}});[/code]

Member Avatar for dospy
0
124
Member Avatar for delifion

Hi, this is what i'm trying to do [icode] class a { private: string attribute; string p_msg; public: string& getAttribute() { return attribute; } }; [/icode] above is the class, i want to call function getAttribute() from class a is a linked list: list<a*> aa [icode] void sortFile(Manager& manage, const …

Member Avatar for Nasas
0
151
Member Avatar for james6754

So in C# I can create an array of n elements: [CODE] int[] myArray = new int[n]; [/CODE] I have looked and it doesn't seem as though I can create an array like this in C++ (using new). Could anyone please explain why I cannot use new to create an …

Member Avatar for james6754
0
88
Member Avatar for dakerao

Hello this is my problem below How would i do this: Got a text file called directorycontents.txt in this directorycontents.txt there is a bunch of text each one is a filename with a filename extension i want to be able to go like this if there is a filename extension …

Member Avatar for dakerao
0
191
Member Avatar for infantheartlyje

Hi folks, I have written code to random access files in c++ . I got result without creating a method for write a record to the file. I have given the code snippet below. [code] #include<iostream> #include<fstream> #include<iomanip> using namespace std; class student { int rollno,marks; char name[20]; fstream fpointer; …

Member Avatar for infantheartlyje
0
316
Member Avatar for fkrafi

I can compile following code using "cl A.cpp" but i want to compile with an input file A.in and generate output file A.out.. is there any why to do that from cmd.... [B]A.cpp[/B] [CODE] #include<stdio.h> int main(){ int n; while( scanf("%d", &n) ){ if( !n )break; printf("%d\n", n); } return …

Member Avatar for WaltP
0
234
Member Avatar for klw

I am writing code for a C++ class. I have tried a couple of different ways to write it, but I keep failing. Here is what I have so far and also what the assignment asks us to do. Please help You have been asked to write a program to …

Member Avatar for MandrewP
0
150
Member Avatar for snorky

project help! how to make shape like this? (using "while") * * ** ** *** *** **** **** ***** ***** very please, i need help immediately... i can make only one triangle(using "for"), but now i'm gonna make two triangles using "while".... ------------------------------ and this is my triangle(using "for"),, but this is only one shape …

Member Avatar for snorky
0
91
Member Avatar for truetexan

Background: I learned old-school c++ programming techniques, being able to declare global variables before the main() routine. However, in Vis C++, I am having trouble, especially with global arrays. I am programming a Windows Forms application. In it, I declare a global integer array just after all my includes in …

Member Avatar for truetexan
0
235
Member Avatar for Groovemix

I do not under stand how to get NODE to work. Worked fine with typedef struct but when I changed to template stopped working??? [CODE]template<typename T> struct Node { struct Node(T data) { this->data = data; previous = NULL; next = NULL; } T data; struct Node *previous; struct Node …

Member Avatar for Groovemix
0
138
Member Avatar for noobprogrammerr

Hi, i would like to know to retrieve out the date and time from my database to show on the wcf test client and for eg, after choosing a certain date, how to do the coding in order for the events to show that's happening on the date i choose …

Member Avatar for noobprogrammerr
0
173
Member Avatar for pendo826

I want to place an object into an array so that when i call the array my stats, inventory objects will show up is it possible ? here is my code: [CODE] void displayStats() { const int SIZE = 11; string stats[SIZE]; status Status = {100,20}; cout << "******Stats******\n"; stats[0] …

Member Avatar for raptr_dflo
0
234
Member Avatar for fsefsef23

Please bear with me as I am awful with pointers. My instructor gave us an assignment whose main focus is inheritance. We have an 'item' class that has 2 classes derived from it, discountItem and taxableItem, the main difference being that they add a tax and a discount to their …

Member Avatar for raptr_dflo
0
101
Member Avatar for jackly94

My Struct was looping and working well, Till i Added in a New Struct and add that to the Loop, Now its not Working that well plus not outputting the Details only the hours. could some one help me with this.. [CODE] struct Trains { int Train_Id; //train ID string …

Member Avatar for raptr_dflo
0
132
Member Avatar for stevo7624

I need help getting through a class I have to take. I know basics but need help with some of the more complictaed issues. For me that is arrays, classes, stacks, and so on. If someone is willing to help I would appreciate it. I could use some more personalized …

Member Avatar for raptr_dflo
0
133
Member Avatar for thecoolman5

hi, I already know how to use setprecision but the function wont let the round go up past 16. [CODE]#include<iostream> #include<stdio.h> #include<math.h> #include<iomanip> using namespace std; int main () { double pi = 3.14159265358979323846264338327950288419716939937510; cout << setprecision(50) << pi << endl; system("pause"); } [/CODE] the output is just 3.1415926535897931 the …

Member Avatar for raptr_dflo
0
3K
Member Avatar for XodoX

I'm talking about Flow of Control, Functions, Parameters, overloading, arrays, classes, Pointers and dynamic data structures,exception handling, operator overloading and perhaps including linked data structures. I am not liking the programming exercises the book has at the end of each chapter. But I will have to program something to really …

Member Avatar for raptr_dflo
0
155
Member Avatar for TheFearful

Hey guys, I am having trouble in writing this code. I don't know where to start other than the beginning basic things. I just need to know how to start this thing because I know it is a loop, but loops are my weakest things as of right now. Here …

Member Avatar for raptr_dflo
0
337
Member Avatar for james6754

Hi everyone, just learning c++ cannot for the life of me work out what is wrong with this code..? All I am getting is cout , undeclared identifier. Anyone help?

Member Avatar for WaltP
0
339
Member Avatar for Raim

So basically, I'm making a Windows Form Application CLR which calculates a worker's wage. Problem is, when I select the schedule (day,night,afternoon,mixed), I use a button for each schedule respectively, which, upon click, calculates everything on the data you've input. While this is effective, I am being asked to use …

Member Avatar for Ancient Dragon
0
400
Member Avatar for n0de

Hi, there is that thing that i need to handle atoi () function error.. Now for explanation atoi ( some const char * which is int (like '1') ) gives me that int, but if i write like this atoi ( 'n' ) then shit happens and it return's a …

Member Avatar for MeduZaPaT
0
715
Member Avatar for myrongainz

I can reverse it but can't figure out how to reverse it in pairs. example - hello output - ol le h [CODE]#include <iostream> #include <string> using namespace std; int main() { string user; cout<<"Enter a random text"<<endl; getline(cin,user); for(int i = user.length();i>=0;i--) { cout<<user[i]; } return 0; } [/CODE]

Member Avatar for mrnutty
0
175

The End.