General C++ Programming - January 2015 (Page 21)

String related program (swapping)
 
This program is not giving the write output. Please tell me what is wrong. Q.Write a program using user-defined function which is passed a string and that fu...
[19 replies] Last: int x; double numbers ; This is illegal. The length of the array ... (by MikeyBoy)
Not able to understand this question.. Please help !
 
Write a program using the function SeqSum() with two arguments, double x and int n. The function should return a value of type double and it should find the su...
[1 reply] : functions: http://www.cplusplus.com/doc/tutorial/functions/ loops: ht... (by mutexe)
by Xhobi
Text file using filehandling
 
For Example i have made a text file included some students data. Now i want to change just a single student data. That file should remain same just that stu...
[3 replies] Last: Indeed I got your point. Maybe if you would show some code, we could t... (by bugbyte)
ADDING INT TO STRING C++
 
can somebody tell me whats wrong with my program ? it always says that coundnt find match operator ? what can i do ? i want to multiply string pay to int HOU...
[3 replies] Last: where ever you want to calculate with int values in strings. Who shoul... (by bugbyte)
Segmentation fault on multimap iterator
 
I have created a multimap for my road points. The key refers to the road number and the values are vec3 points that make up the road. I am trying to iterate t...
[1 reply] : i've not used multipmaps, but what's the value of it.second when yo... (by mutexe)
Initialize a class in a manner similar to C arrays.
 
Hi. I'm completing an online programming challenge (non-competitive) just to help me broaden my C++ skills a bit. In my case, it involves making a wrapper cl...
[2 replies] Last: Wow, incredibly simple! I wasn't aware of this being part of the stand... (by closed account 42AMoG1T)
by Lither
Pseudocode Help
 
I want to create a top trumps game using pseudo code with variables, loops, If statements and inputs, how would I write it? Thanks
[3 replies] Last: Pseudo code is now like a placeholder for real code, you stop the logi... (by TheBeardedQuack)
by ntran
Calling functions from text files
 
Hi everyone, (Let's see if i can explain myself) I'm working on a code that reads a text file and follows the instructions written in that file. An example of ...
[5 replies] Last: I would suggest a std::map<std::string, std::function<std::unique_ptr... (by LB)
by jdmic
Class using "new" operator
 
Hi, Is it usual to rely completly on the new operator in constructors/copy constructors. What if new trows an exception? The application ends and that's it? ...
[9 replies] Last: I see. But expect one or the other this is still "expect ". In the cas... (by jdmic)
C++ Single class definition
 
In the project I'm currently working on I define a class that only inherits from a parent class and takes one argument. Does this class need to be defined in th...
[1 reply] : A class specification describes the interface to objects of this class... (by tcs)
From Recursive To Iterative Function
 
Hello , I am trying to make from f_rec (recursive function) to f_iter (iterative function) but I can't. (My logic was to create a loop to calculate the results ...
[2 replies] Last: thanks (by oleg9419)
by Jt253
What will the following program segment display?
 
hey guys, I'm looking at this program here: int count = 1, number = 1, limit = 4; do { number +=2; count ++; } while(count < limit); cout << number...
[2 replies] Last: Hi, You could put a std::cout statement inside the loop to see wh... (by TheIdeasMan)
Really strange compiler behaviour
 
I (accidentally) had code along the lines of this: class foo {}; class bar { public: foo x; void doStuff (); }; void bar::doStuff () { ...
[2 replies] Last: The x in doStuff is not related to the x class member variable -... (by LB)
Employee Program: Bizarre error with 'if' statement
 
Hello :) I have written a program that stores employees in a database object. You can Add, hire, fire, promote, demote, and display employees. The program uses...
[6 replies] Last: who knows? probably, but its not worth doing unless its necessary. (by jasonwynn10)
by itpp14
Strings always require an extra memory buffer, why?
 
Hello, I am trying to add some functionality to this project: https://github.com/openresty/lua-upstream-nginx-module under this https://github.com/openresty/lu...
[5 replies] Last: And while I was doing that I realized a few things, a minimal example ... (by itpp14)
File program to read in reverse order the contents of a file.
 
it's urgent, i've my exam tomorrow. please correct the errors. i've done so far. #include<iostream> #include<fstream> #include<cstdlib> #include<iomanip...
[5 replies] Last: edit: nvm, what I posted was wrong. (by bugbyte)
by BasV
strange for loop behavior (?)
 
Edit: I found out the debugger I was debugging with actually displayed the wrong 'current' breakpoint, showing me it was at the return line while it was really ...
[no replies]
by wdpats
My program won't run
 
I have programmed a program for billing system. I have used parameters and arrays. All the functions are working except a one function. (Regular package functio...
[3 replies] Last: I am most certainly not going to try to guess what your error is in t... (by mutexe)
Reading & Writing data in text file
 
Hey Guys. I need your help. Can someone please tell me the code to write data(Double type e.g 12345.67891) in text file like pattern given below. Remember to pu...
[3 replies] Last: you can easily write to an ofstream like this: double d = 5.5; os <<... (by bugbyte)
IWebBrowser2 Navigate: Postdata not submitted
 
Hello everyone, I'd like a specific webpage to be called in IE while submitting some POST data. I'm using the IWebBrowser2 interface and the navigate method....
[no replies]
January 2015 Pages: 1... 192021222324
  Archived months: [dec2014] [feb2015]

This is an archived page. To post a new message, go to the current page.