Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~7K People Reached
Favorite Tags
Member Avatar for gregarion

Hello All, I am facing a problem coming up with a SQL query for a certain issue: Table 1 ------------------- Client ID|Name of Client|Customer Type|Account Type| 01| A | AB | 30 | 02| B | AB | 30 | 03| C | CD | 30 | 04| D | …

Member Avatar for gregarion
0
205
Member Avatar for gregarion

Hello All. I have an issue with string manipulation. The file which I am using has two lines : First String: 1 4 Second String: 5 4 What i am trying to do is while reading each line, i would like to store each variable in the line into 3 …

Member Avatar for rch1231
0
195
Member Avatar for gregarion

Hey guys , i have a small problem regarding calculation in c++. Here is an example below [CODE]int main() { int f = -32; int d = 2; int re = d - f; int re2 = 2 - (-32); int re3 = 2 - - 32 } [/CODE] The …

Member Avatar for tkud
0
119
Member Avatar for gregarion

Hey guys, i been trying to tokenize a string using the boost library. [CODE]int main(){ using namespace std; using namespace boost; string s = "This is, a test"; tokenizer<> tok(s); for(tokenizer<>::iterator beg=tok.begin(); beg!=tok.end();++beg){ cout << *beg << "\n"; } [/CODE] The problem i am facing currently is that i am …

Member Avatar for vijayan121
0
404
Member Avatar for gregarion

[CODE]#include <stdlib.h> #include <iostream> #include <cstring> #include <string> /* Include directly the different headers from cppconn/ and mysql_driver.h + mysql_util.h (and mysql_connection.h). This will reduce your build time! */ #include "mysql_connection.h" #include <cppconn/driver.h> #include <cppconn/exception.h> #include <cppconn/resultset.h> #include <cppconn/statement.h> using namespace std; int main(void) { sql::Driver *driver; sql::Connection *con; sql::Statement …

Member Avatar for mcriscolo
0
1K
Member Avatar for gregarion

Hey guys , i am having a problem with string arrays. Basically ,i declared my array in the header file. Here is my prog. [CODE]Main.cpp using namespace std; int main(){ string Test = "fat"; e te; te.b(Test); } Test.h class e { public: void b(string) string a [ ]; int …

Member Avatar for Ancient Dragon
0
150
Member Avatar for gregarion

Hey guys , i need some help in understanding this coding. This is a client server code which i got off the internet . The problem i am facing is that when you run the server , the server will continously wait for incoming connections . I would like to …

Member Avatar for djarn
0
138
Member Avatar for gregarion

Hey guys , i haing a problem with using stringstream and atoi . I am trying to conert a string to in integer When using stringstream [CODE] string d = "033116"; int b = 0; stringstream ss (d); ss >> b ; [/CODE] When using atoi [CODE] string d = …

Member Avatar for deltamaster
0
519
Member Avatar for gregarion

Hey guys , i am facing a problem using fprintf. Basically what happens is that , i will use it to read from an array and store the information in a txt file. The problem i face is that , for some reason , numbers such as "02 , 05" …

Member Avatar for gregarion
0
98
Member Avatar for gregarion

Hey guys , as from what i read up , the function srand() and rand() are able to give u random numbers if they are being run one time only. What i am trying to do is to produce a set of random and unique numbers from 1 - 10. …

Member Avatar for ixmike88
0
113
Member Avatar for gregarion

Hey guys, i am having a problem passing my array into a function . What i am trying to do is to pass my array called Alphabets[] from my main into a function called Key. THe issue i am having is that i keep getting an error telling me that …

Member Avatar for LevyDee
0
109
Member Avatar for gregarion

Hey guys , i written a code to call another external program i wrote , but the problem i am having is i am unable to save the output into a variable. using namespace std; [CODE]int main() { const char r = system("samp -s1122") ; cout << r << endl; …

Member Avatar for jonsca
0
85
Member Avatar for gregarion

Hey guys , i have a problem understanding the domination relationship in a lattice model. For example , i have a multi-level classification {Confidential , Secret} and multilateral categories {N ,E , W} . So , if i were User A , and i have a security level of (Secret …

0
41
Member Avatar for gregarion

Hey guys, i am working with a program to basically read an input for a file and then storing it into a vector. my text file is called Sample.txt and contains data like this.. [CODE]How are you coping with programming? The quick brown fox jumps over me.[/CODE] Here are my …

Member Avatar for NathanOliver
0
92
Member Avatar for gregarion

Hey guys , im having a problem writing into a file. Basically ,i have a program which read an input from one file , and then calls it to the function of another method. Here is how my program looks like. [CODE]using namespace std; class Team{ public : void Readfile() …

Member Avatar for gregarion
0
111
Member Avatar for gregarion

Hey guys, i am working on a project which basically takes a string which is being inputted by people and then adding it together and displaying in a certain format. What i am having problem is when i try to read the string and store it into the functions. [CODE]class …

Member Avatar for jonsca
0
115
Member Avatar for gregarion

Hey guyy , using getline allows us to read a file line by line. but is it possible to use getline to read individual words in a line? For example. Test.txt My name is John. Using getline will read the entire line... [CODE] int main (){ string templine; ifstream myfile("test.txt"); …

Member Avatar for NathanOliver
0
134
Member Avatar for gregarion

Hey guys i need a bit of help in getting my answer correct. Basically , im trying to get my answer to 2 decimal places when i divide one number by another... [CODE]int main(){ int Totalgpa = 46; int e = 13; int SemesterGpa = Totalgpa / e ; cout …

Member Avatar for Avatar99
0
80
Member Avatar for gregarion

Hey guys , i am trying to write an array into a textfile. Here is the coding... [CODE]int main() { ofstream myfile("report.txt"); int g = 0; int billy [] = {16, 2, 77, 40, 12071}; for (int n=0 ; n<5 ; n++ ) { g = billy[n]; myfile << g …

Member Avatar for Fbody
0
108
Member Avatar for gregarion

Hey guys , im having a problem in starting a project. Basically , i am suppose read from a file(Data.txt) and then display the information in that file in a new format. Data.txt HIstory M123 Maths M103 Science M111 English M105 As the results needs to be displayed based on …

Member Avatar for pecet
0
110
Member Avatar for gregarion

Hey guys for my assignment i have to write a program which checks the information inside a text file to make sure it is all integers and then convert the integers to roman Numerals. My program seems to have a bit of a problem and im not sure where exactly …

Member Avatar for r.stiltskin
0
175
Member Avatar for gregarion

Hey, i was reading up on find function and i came across this line. size_t find ( const char* s, size_t pos, size_t n ) const; Correct me if im wrong, but it basically allows us to search a string based on the information inside an array right? After searching …

Member Avatar for mrnutty
0
147
Member Avatar for gregarion

Hey guys, i am having a huge problem checking the data i input to make sure it is correct. What i am trying to achieve is when i input a value, it will check if the input is all digits and if it is not, check to see if it …

Member Avatar for mrnutty
0
91
Member Avatar for gregarion

Hey guys, i was looking through the internet for ways on how to solve converting roman numerals into integers and i found this method which is confusing me as im not able to understand it. [CODE]using namespace std; int main() { char rom; int n = 0; int tot = …

Member Avatar for gregarion
0
105
Member Avatar for gregarion

Hey guys , i would like to ask some question regarding checking if a string is all integer. First off, i wrote a program to check if the value i enter contains strings. [CODE]string str; int n = 0 ; cout << "Enter the letter please "<< endl; cin >> …

Member Avatar for Robert1995
0
177
Member Avatar for gregarion

Hey guys, i am having a problem solving a this part of my coding. Basically, what im doing is for the program to read a string, and if there is a value of 'M', the value of num will go up by 1000. Here my coding .... [CODE] string msg …

Member Avatar for gregarion
0
156
Member Avatar for gregarion

Hey guys, i been looking through at questions regarding roman numerals and i have a question. i ran some of the coding which i found and i dont quite understand this part.. [CODE] int number = 3000; int number2 , i ; number2 = number / 1000; for(i = 1; …

Member Avatar for metdos
0
102
Member Avatar for gregarion

Hey guys, i am having a problem in getting to store data in a text file. I have a certain text file which contains data in this format... [CODE]Jimeno Rames James Kimon[/CODE] what i am tryng to do is to store each line into a seperate value. The problem i …

Member Avatar for jonsca
0
87
Member Avatar for gregarion

[CODE] string NewMovie = "ww"; string queryText ; queryText = "INSERT INTO movie_info (movie_title ) VALUES('" + NewMovie + "')" ; MYSQL *conn; conn=mysql_init(NULL); mysql_real_connect(conn,host,username,password,database,0,NULL,0); mysql_query(conn,queryText.c_str()); mysql_close(conn); return 0; [/CODE] What i would like to know is how am i able to do a check to see if such a …

Member Avatar for Fbody
0
141
Member Avatar for gregarion

Hey guys, i am having a problem in my query statement. I am using Mysql in Netbeans and c++. Really Hope for some help. I posted it here as i read up a bit on it and it seems the solution is based on c++. What i am trying to …

Member Avatar for Fbody
0
2K