General C++ Programming - March 2013 (Page 5)

Looking for a sending script
 
Hey Guys, i hope i am getting help now in a international Forum. I am not really a C++ coder. But I need a script (a code) for a project. First at all: sorr...
[no replies]
Why doesn't this work in Windows Form Applications?
 
void toLowerCaseSTD(String^ &str) { transform(str.begin(), str.end(), str.begin(), tolower); } The error is this Error 2 error C2228: left of '.en...
[12 replies] Last: @naraku9333 I need it to be a "const char*" which that does not conve... (by naraku9333)
Urgent help
 
i am having difficulties doing this program. i dont know how to search for the value 80. #include <cstdlib> #include <ctime> #include <iostream> ...
[1 reply] : [quote=moneysab]also the programs outputs only 41 random integers. [qu... (by LB)
adjucent_find
 
the deleted my query as there was a mistake in my code.
[1 reply] : the deleted my query as there was a mistake in the code. (by cppUser77)
Program stops mid-way.
 
I'm doing an assignment for a C++ class, and I can't seem to figure out why my program keeps hiccoughing in the middle of running. The program runs fine when I ...
[7 replies] Last: Look at the order and use of your parameters. You pass (string, copy) ... (by LB)
Linked List Code
 
I'm having trouble with this code: #include <iostream> #include <cstdlib> using namespace std; #ifndef Null #define Null 0 #endif class Node ...
[2 replies] Last: http://ideone.com/N3EXgI[quote=gcc]In function `main': prog.cpp:(.text... (by LB)
Use Object in Header File Field
 
Hello all, I need to use an instance of an object in a header file. The object requires a lot of pre-computation to be created. I want to assign it to...
[14 replies] Last: Thank you. You have been of great help. I will follow your advice; how... (by knowNothing)
by spelly
expected ")" before "*" token.
 
Hello, i`ve been trying to solve the following problems for ages. I really hope someone can help me. Really grateful for all help! I got the following err...
[9 replies] Last: Ok, i am sick of this code and i give up. If anybody care to fix the p... (by spelly)
please help me with this problem!
 
thanks all for reading up until this point. im a total noob and stuck on this problem (Program) a. Write a C++ program to convert meters to feet. The prog...
[4 replies] Last: where would i place 'cin >> meter;' At the point in the code where ... (by MikeyBoy)
finding if string has unique characters
 
bool isUnique(string _str) { bool char_set ; int len = _str.length(); memset(char_set, '\0', 256); for(int i = 0; i < len...
[8 replies] Last: everyone....thanks for replying. (by venkatacplpl)
Why doesn't this work?
 
//Why can i do this to de-allocate from the heap, char * p = new char ; void *i = p; delete (char*)i; //but not this? //Can you explain? char...
[2 replies] Last: Is it a typo? Yes, and not it works. Thank you. char * p = new c... (by IndieExe)
Void Functions
 
Write the function void readTest(double & exam, double & tavge) the does the following: a) print the prompt "enter exam score:" than read the exam score b) pr...
[10 replies] Last: [quote=baketballcourt]isnt a void function when you do: void computeAr... (by LB)
operator << used in for loop and if statement
 
hello, i came across some c++ codes using following statements : for(int i=0;i<(1<<n);i++){ some statements ..............} and if(n&(1<<i)){ state...
[5 replies] Last: @cire : Ok, you're right with the meaning of ^ in C++. But I've defin... (by tcs)
by Tresky
Pointer Question
 
Here is a sample code of an example of pointers. Does it present a problem to free the same piece of memory twice? In this code, the address pointed to by p obt...
[3 replies] Last: Awesome! Thank you very much. Very helpful answers. :) (by Tresky)
resizing an array
 
int size = 10; int* arr = new int ; void resize() { int* resize_arr = new int[size + 1]; for(int i = 0; i < size; i++) resize_arr = arr ;...
[7 replies] Last: Now that will work. (by zoran404)
by Medino
If statement multiplication by zero problem.
 
I have a minor problem. I want to set an integer to zero when it easy equal to another integer, but it seems that the program for some reason won't set the int...
[2 replies] Last: Thanks for the help. But I could swear that I've already tried those t... (by Medino)
Queue Template Help / General Questions
 
I'm working on a queue template, here it is below: //CLASS DEFINITION SHOULD BE HERE... template <class T> //Template constructor Queue<T> :: ~ Queue() //pas...
[5 replies] Last: Can you elaborate....Sorry a bit confused. About which part? The n... (by cire)
by Anshh
Can i edit the text file without writing the content of whole file again.
 
Can i edit records stored in file without rewriting whole file again .?
[1 reply] : This depends on the filsystem you are using. The most common filesyste... (by tcs)
Should I learn a scripting language?
 
When I've or heard people talk about their games occasionally I would here about how the scripted so and so for this to work etc. I'm not even sure what scripti...
[2 replies] Last: If you play WoW, I believe all the addons in that are written in Lua. (by ResidentBiscuit)
want write these programmes
 
Write a complete C/C++ program for the following tasks i. Create two arrays named intArray and squareArray with a user defined size. ii. The intArray s...
[1 reply] : From http://www.cplusplus.com/forum/beginner/1/: Don't post homewor... (by tcs)
March 2013 Pages: 1... 34567... 51
  Archived months: [feb2013] [apr2013]

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